Upgrading to Jekyll and GitHub PagesTech ·
When I resuscitated this blog back in February, I had a number of things I wanted to accomplish around my domain. Mostly I wanted to move off the hosting provider that I used to have. While cheap, their mail service was pretty poor.
I elected to
- Move my mail to Google “business” account ($7 / month)
- Move my blog from Wordpress to Jekyll / Github pages.
I’ll talk about the latter here. I can’t really recall all the details, but the major issues were around DNS, not around setting up Github Pages.
There’s nothing wrong with Wordpress. Many amazing sites are built off it, and I would really recommend it if you just want to get a site up and running. The main reason for me were that I wanted to decouple the content content from the presentation, and I wanted a release mechanism more similar to what I have at work.
So, why Github pages? Basically, Github pages run as a Jekyll static site. The content comes from Markdown documents stored in the repository. Any push or merge to the main branch results in a deploy of the site. It’s free as long as my repo is public, and gives me security updates that I don’t have to manage. So that pretty much got me all of the requirements I had.
I used two plugins to facilitate this move. First, I synced my Wordpress site to Github using the WordPress GitHub Sync plugin. By using this, my posts (once converted) would end up in my Github repo. I then used something like the Gatsby exporter (although I can’t really remember if it was this exact plugin) to export my posts as markdown. I built a Jekyll site, but by working towards separating content from presentation, the Gatsby plugin just worked.
After exporting the posts, I had to tweak any inline images. This process was pretty straightforward. I also had to fix inline links to other blog posts, and this is a case where the separation breaks down. The URL structure (where I have all posts as root-level easy-to-read URLs) is a part of the implementation that bleeds into the content.
I then tried to match the style of my old blog. I had purchased the Ample by ThemeGrill theme, and thought it looked pretty good. I needed a Jekyll theme that I could adapt to look as close as possible. I went with Alembic by David Darnes. It has great flexibility and can be used as a remote theme when compiling at deploy time.
I’ve had fun trying to get Alembic to look like my old theme, and I like having my content in Markdown. Plus a Github repo gives me versioning and all that fun stuff. You can see the changes I’ve made to Alembic in my repo. My feeling was, since the blog is public, the repo might as well be.
Jekyll has been not bad overall, and gives me some real flexibility in the future.