So, the newest version of this blog is using Jekyll. Jekyll is a static site generator. Typically, when you are using one of the large blogging platforms like Wordpress, you use the admin section to add content to the database and when a user visits the site, this content is fetched and built into a page for them to see. Static site generators work a bit different, they actually pre-generate all the pages as html from templates and posts that you have pre-defined. You can either do this locally, and transfer them to your server, or create them right there.
There are of course disadvantages and limitations, which generally apply to all static generators rather than Jekyll specifically. Firstly, it’s much easier for someone new to blogging to set up a wordpress blog. Many of the cheap hosts out there come with some form of application install service, where it takes even less time to get started than wordpress’ famous “5 minute install”. After that, you just log in and click “New Post”, and it pretty much just works out of the box. With Jekyll on the other hand, you need to install ruby locally, manually create new posts in markdown format, run
jekyll build and then FTP the files to your host (Or deploy with git, or set up CI). You will also be limited functionality wise, for example, if you want to allow commenting, you will have to farm it out to someone like DISQUS.
That being said, I enjoy being able to create and edit new posts direct from the terminal, which is probably where I spend most of my time these days anyway, and given how infrequently my bursts of keeping this thing updated, the fact that the actual site won’t typically become more of a security risk the longer I neglect it, is also a distinct advantage.
Setup is relitivly straight forward, the quickstart guide guide covers it quite well, but in summation:
The distro I am using shipped with ruby 1.9.something, and jekyll 3 requires 2+, but you can find instructions for updating ruby right here
You will probably want to spend a bit of time configuring it, but at it’s core, each post or page contains metadata at the top of the individual markdown document, this metadata is used to tell jekyll how to structure the pages. What way the folder structure is created, what date to apply to posts and what html to wrap around it. Posts go in your
_posts folder, named in the
YYYY-MM-DD-post-title.extention format. I have been using markdown, but html (and I believe textile) work just fine too. Pages can go anywhere, either in a sub folder or just in the site root, and pretty much work the same way.
_layouts folder is where your ‘themes’ live. Each post and page should have a layout value in the liquid metadata at the top, and this is what jekyll uses to wrap the content. These layouts support inheritence, and you can seperate off things like headers or whatever into the
_includes directory. Any folder not beginning with an underscore is included in the build of your site.