open index.html
pip install markdown2 pyyaml
- Write the blogpost in markdown format and add it inside the posts folder. For example,
posts/example.md
. Make sure that all your latex format are inside$
or$$
for inline and block latex respectively. - Run
python3 generate_post.py posts/example.md posts/output.html
to generate a HTML file with proper latex formatting. - Duplicate the
post_template.html
file and rename it toyour_title.html
. Inside the file modify the<div class="post-title">
and<div class="post-date">
. - Copy the content of
output.html
into the<div class="content">
class ofyour_title.html
. - Add your post inside the
<div class="article-list">
inindex.html
file for your new post following this format
<a href="posts/your_title.html" style="text-decoration: none; color: inherit;">
<div>
<span>TITLE</span>
<span>yyyy-mm-dd</span>
</div>
</a>
- Double check the correctness of the newly added blogpost:
- Check the links
- Check the images (these are not automatically imported from HackMD)
- Check the Latex formatting
- Delete the
output.html
file and the original markdown file.