Migrating to a Static Blog

2015-09-16

What an interesting turn of events. I started writing this blog post with my intentions fully moving away from Ghost , which is written in NodeJS, to Pelican , written in Python. I wrote mostly a whole article about choices I was making. All of which were in the direction of Python. I mostly wrote off Ruby as a “hipsters” language. So I decided to stear clear as much as possible. As is most of my life as of late, something I swore off for so long, eventually comes back and I’m willing to give it a shot. Go figure. Anyway, onward to a slight article about moving to a static blog!

When I started out, I set out to find out what Python frameworks were available for creating static blogs. Since my articles were already written in Markdown and I finally got the hang of it, I didn’t really want to change that. I found that Pelican, Nikola, Crotal and Hyde, Python’s answer to Jekyll. As the plan was to use Python, I wanted to at least be running Python3. This isn’t some hard requirement so much as a personal one. That marked Crotal off the list. Next came Hyde. Unfortunately, their documentation for Hyde was pretty lousy, so goodbye Hyde.

I thought I had narrowed it down between Nikola and Pelican. Pelican is easy to setup. Simple and quick to get running. Plenty of different themes. My biggest issue with was that the metadata info for each post, page, and any configuration options all were dependent on the theme being used. I guess that can be a possibility for all themes and static website generators. I really didn’t want to have to play with the front end much or at all and that was especially true regarding learning how to create or modify themes.

Nikola was much the same as Pelican. I had to make changes to the metadata of my posts, pages, and adjust the configuration files. Again, there were plenty of themes; however they too ususally had some features pertaining to configuration parameters or metadata. Theme maintainers may not have made changes anywhere from 2 years to 2 months, most closer to a year plus. I can’t completely blame them, as once they’ve built something for their own use, they are done, and are only sharing their work for others to be able to use and build off of.

I decided to try out a Ruby static site generator, Jekyll. After scrounging through their documentation for a bit and realized that I wouldn’t need to install Ruby on the server and could just deploy the generated files over to a www directory. Duh, I realized I could do this with the Python static site generators too; I’m just used to running Python code and sites on servers. Back to Jekyll. Configuration was a little more work along with the syntax. I like how I’m able to use either metadata or proper file naming for posts to be either a draft or live. If your files for posts aren’t prepended with ‘YYYY-MM-DD-’ or ‘published: false’ in the metadata of the file then the generator will not build the pages or links.

Between the Nikola, Pelican, and Jekyll, I chose Jekyll. It gives me an excuse to try and learn Ruby (although said knowledge isn’t needed for setting up a site). All three have quite a few options for themes and customizability. There is also pretty much a commonality of pretty much the same syntax to build a new site, create posts, run a dev server for local development, and building or generating the site before deployment.

ramblingswrite-upspythonstatic-blogrubyjekyllghostfreebsd

Single Board Computer Frustration

Technical Blogs