A new blogging engineMonday, 8 January 2018
My last entry about a blogging software switch was called ‘Keeping up with the times’ and I could have called this one the same. Back then, I finally realized that maintaining my Movable Type installation was a pain as I knew next to no Perl but since I was an established PHP developer the migration to Wordpress was a logical step. Now I’m ‘admitting’ that I slowly transitioned to being a Ruby developer so I’m embracing Jekyll.
So what were the other reasons for the switch?
- I was getting a little paranoid about Wordpress and the plugins I was using. I wasn’t terribly excited about the perspective that if a security flaw appears and I’m not updating in time (if an update is available at all) my server gets f!@#ed.
- It takes Jekyll about one minute to generate the whole site but the resulting files are vanilla HTMLs so they’re served much faster than their Wordpress equivalents. I haven’t even configured the web server for this site to include the PHP interpreter. As a note here, while discussing this post with Alex he mentioned that there are caching solutions and even a static site generator for Wordpress too.
- I wanted to use the gem that I’m a maintainer / co-author of, in a “production” environment. I put quite a few hours of work into it and was very curious to actually see it doing its job.
What are the downsides?
- Not being a dynamically generated database backed site the comments have to be served by a third party system. There might be self hosted alternatives out there, but I haven’t researched them because I had Disqus integrated with Wordpress for a long while anyway. I’m still not entirely comfortable to give all my comments away to a third party service (up until now, comments were also saved locally by Wordpress).
- I had my concerns about search, and I thought I’ll have to insert a Google search box, but recently I discovered Algolia which is awesome and a lot faster than the Wordpress search was. See it action!
- I have to admit, Wordpress’ media manager was great and I’m badly missing it.
Actually the migration began in 2014 when I discovered Jekyll and the majority of the post files were created back then by an import from Wordpress, but they were of sub-par quality with lots of junk in them. So in the last few days I hacked together some Ruby scripts which:
- Removed useless YAML attributes and converted the ugly binary dates generated by the import.
- Fixed the formatting of tons of posts. This was due since 2009 when I switched to Wordpress but I thought I’ll do it on a need by need basis as I stumble upon posts with broken formatting. Which I did, but it wasn’t nearly enough. It was the Algolia search that prompted me to do this whole clean-up as my unformatted older posts were generated as one long paragraph and the indexer wasn’t accepting them.
- Fixed internal dead links. Lots of posts were still containing links to other posts using the old permalink style - /blog/archives/year/month/day/post_name. Now they all point to the correct format - /year/month/day/post-name/.
- Updated links to assets which were moved to content.rusiczki.net.
Another point that’s worth mentioning is that the generated pages are ran through jekyll-tidy which turns them into deliciously formatted HTML. This tickles my web developer bone the right way. Go ahead, have a look at the source of a page and wonder at the perfect indentation.
Last but not least, the theme I’m using is a lightly customized Hyde, the about page got some long needed updates and to celebrate the launch the site is now secured with a Let’s Encrypt certificate and is served through HTTP/2.
Here’s to many years of static HTML! :)