I wanted to write a blog for when I find useful or interesting things, mainly when programming. Not only will I have an easy way of looking them up, they might also be useful to someone that stumbles upon this blog. This blogpost here was a great help, and the the OPIG Blog inspired me to get started with blogging.
To reduce the barrier of entry for writing a post, I wanted to be
able to write in pure markdown. While there are multple ways to convert
markdown to html, pandoc
seems to be the most powerful and
versatile. It might also be interesting to use pandoc
to
convert a draft of some sort to pdf via LaTeX, which pandoc
is also capable of. The installation for windows is apparently not
straightforward (I want to write on my surface), but installing pandoc
on WSL is very easy.
While it is possible to add header-info (like a favicon, keywords and the pagetitle) within markodown in a yaml-block, I chose to write a short python program, that will take the necessary keywords from a comment at the top and thus keep the markdown-file itself as pure as possible.
Using a template from HTML5 UP!, I
created a personal website (following the steps outlined in the blog
post mentioned above). With the template.md
file I
adjusted the CSS from the template (adding code-highlighting, …). I then
added a link to the blog via a page blog/index.html
, where
I will (have to manually) add the blog entries, as I write them. The
complete workflow for creating a blogpost is as follows:
template.md
file.python _md_to_html.py <blogpost>.md
from the
blog
folder.blog/index.md
and run
python _md_to_html.py index.md