I have used a few different static site generators including:
- GitBook
- Hexo
- HubPress
- Hugo
- Jekyll
- Pelican
and each lacked a very important feature: a flexible, powerful and well-documented templating engine. By this I mean a templating engine that:
Allows for the inclusion of content from multiple files within a post, with rendering being the same as it would be if the content of the multiple files was placed in the post. For example, on my present Jekyll-powered blog I often split posts up into smaller, more manageable markdown files. Jekyll allows me, using the Liquid templating engine, to include these markdown files into the final post. If you would like to see exactly what I use and mean, here is an example post file as you can see several markdown files are included into it using
{% include_relative <FILENAME> %}
. Other templating engines have not afforded me this ability.Is able to be extensively programmed with using conditionals, tests, iterations, greps, seds, etc. For example, if I could check if an input given contains a string (but not necessarily being equal to that string) that would be helpful. Likewise if I could strip off everything that comes before a forward-slash
/
(e.g., if the input was the web addresshttp://www.example.com
, this would cuthttp://
out and leave me withwww.example.com
) in an input and use it that would be helpful. If an input was of the forma/b
(e.g.,games-strategy/megaglest
, wherea
isgames-strategy
andb
ismegaglest
), it would be helpful if I could split it into two partsa
andb
and usea
andb
separately in my templates.Has comprehensive documentation. I have not come across a single templating engine used by a static site generator that has comprehensive documentation, the one with the best documentation at the time of writing this question was probably Liquid but it is still not comprehensive.
Linux compatibility is also important as I would like to deploy to GitHub pages and to do so, with most SSGs (except Jekyll and HubPress) I need to be able to build the site locally (which for me is on Linux) and then push the site content to the gh-pages
branch of my repo. Support for markdown posts is also a must. If pages other than posts can be included (like an about me page for the website) in the site that would also be excellent.