Jekyll Rocks!
I have to admit, I’ve been looking for something like Jekyll for a long time! Guys at GitHub just know how to create awesome products.
My personal website used to be written in ASP.NET, and it felt not the right tool for the job. Of course, you don’t need active server pages for a couple of HTML documents, but you do for the blog. There is always WordPress, however it’s too heavy, slow, requires to remove almost everything before desired look-and-feel. No, WP, thanks, next time.
Not speaking of free hosting!
Ok, I’m a fan now, let’s create our awesome blog. We would need a couple of useful things: Comments and Analytics.
Disqus comments
It seems that Disqus commenting system is everyone’s favourite, We’ll use it as well.
Comments will be enabled by default, to disable just add comments: false
to post Front Matter
By the way, to highlight a Liquid template inside Liquid template we need to use raw
tag
Don’t forget to close tags with endraw
and endhighlight
.
This was skipped from the example, because Liquid throws syntax errors for nested tags.
disqus.html
is located in _includes
folder and contains universal embed code
Disqus asks to provide two config variables, page’s canonical URL and page’s unique ID. To get unique ID we’ll use additional hash generator (author).
Google Analytics
We just need to add a snippet to our default page template
Github Pages hosting
Everything is pretty straightforward: we need to push our code to sbedulin.github.io:master
and add CNAME file for a custom domain. Github gives a good overview on how to
set up a custom domain, subdomains, configure DNS records, differences between CNAME and A, etc,
make sure to check it out.
BTW, Github Pages sets JEKYLL_ENV
to production
for us.