Static Site Tricks with Jekyll
This site is powered by Jekyll and hosted on GitHub Pages. Whilst this is a great platform for hosting, it has some limitations brought about by the fact that the sites must be static and one can’t run custom Jekyll plugins to do things like generate article indexes.
Luckily, however, there are industrious people out there who’ve come up with workarounds for some of these limitations by hacking around with Liquid, the templating engine used by Jekyll. Here are some resources I found particularly helpful.
- Blogging with Jekyll and GitHub Pages is a comprehensive tutorial, covering everything from bootstrapping to Atom feeds and sitemaps.
- How to make an article series. Haven’t used this one in its entirety yet, but expect to, and the templating techniques are powerful and well-explained.
- Syntax highlighting courtessy of Solarized via a modified version of Edward Hotchkiss’ syntax.css.
There are also the standard reference pages I found myself coming back to often.
- Markdown syntax.
- Jekyll’s default Markdown engine, Maruku, supports PHP Markdown Extra syntax.
- Liquid’s standard tags and filters.
- Jekyll’s Liquid extensions.
- Jekyll’s template data reference.
- You can also take a look at the default Jekyll config variables used by GitHub Pages.
There are a few generally-expected features that aren’t supported out of the box: tag clouds; automatic indexes of articles with a given tag/category and comments. Whilst a number of solutions are out there, some future posts here will be looking at developing alternatives that are open and don’t require custom plugins.