19 January 2014

From Wordpress to Jekyll

This post is part of a series: Switching to Jekyll from Wordpress

It's likely that you're reading this on my brand new blogging platform. This post was the last thing I wrote before I pushed eveyrthing live. Goodbye forever Wordpress. It's not you. It's me.

Note: This will be fairly non-techincal. If you want to know specifics about how things were done you can read the site's README file

Why the switch?

I develop websites for a living so when I get home from a long day of coding sites, wordpress updates are the last thing I want to do.

Blogging isn't about web design, it's about content. Problem is, when I logged into WordPress all I would see is plugins that need updating, comments needing moderation, themes needing tweaks etc. It was a major bummer and a disincentive from doing any actual writing.

Right now I'm writing this in a markdown editor (I'm using iA Writer but vim or anything else would work just as well) that saves to a Dropbox folder which will then be auto-published twice a day. I don't even need to log into anything and I can write from my iPad or my phone or from anywhere really without ever having to log in.

From Wordpress to Jekyll

Using the Jekyll importers I was able to get from a WordPress site to a Jekyll one in a matter of minutes.

Bringing over all my functionality took a little longer. Things like search, post series, google analytics and other features required plugins to be added or written.

Benefits of Jekyll

  • More secure than any CMS.
  • Faster than any CMS. I scored an A-grade (91%) from Yslow and the page loaded in just under 1.3 seconds.
  • No Database / No PHP. Did I mention it's fast?
  • Much easier to theme. 1 css file and a handful of templates (maybe 6 but who's counting?)
  • Cleaner HTML than anything a CMS would give you. This is the first website I have ever written that passed the HTML5 validator on the first try.
  • Much better SEO since you have complete control of the markup.
  • Great support for code snippets with pygments
  • Easy integration with Github (free hosting!), Amazon S3 and CloudFront.
  • Plugins are much easier to write than Drupal or Wordpress.
  • Markdown supported. No clumsy, evil WYSIWIGs!!!
  • Everything source-controlled in Git (woo!)

Plugin writing, simplified

Jekyll plugins are written in ruby and seem to work by extending classes in Jekyll. It should be noted that if you go the Github pages option you won't be able to use 3rd party plugins for security reasons.

Because your plugins don't have to content with real-life user requests they can be a lot shorter.

Here are some examples:

Downsides?

Developers are jumping for joy at the implications of Jekyll but it's not all git pushes and happy days. For non technical users there are still some barriers that need to be addressed.

Wait, I have to compile my website?!?

No question; The workflow is problematic. Prose.io goes some of the way towards solving it but I feel like we're still not at the point where we could get our clients on-board. For developers though this setup works great.

Plugin support

Simple. There isn't any. Plugins, in many cases, are just snippets in gists. Mecifully, most Jekyll plugins seem to be a lot shorter than anything you'd find in Drupal or Wordpress so they're actually quite readable.

Also there's the benefit of none of your plugin code ever running on the live site so it takes a whole bunch of security concerns away.

At the end of the day, there is no real substitute for a CMS if you need one. Lots of sites do. Where Jekyll really shines though is if you have a tiny site with a few pages that need to be fast and clean.

Conclusion

While flat HTML might seem like a step backward to some it's really part of the revolution of clean, responsive design. Less is more and content is everything. Jekyll facilitates an easy return to content-based, beautiful sites that look and respond as fast on the desktop as they do on your phone.

Of course, it's not for everyone. Those looking for the simplicity and distraction free content entry of a Jekyll site but not quite comfortable with git should check out the Ghost blogging platform

More Resources

This was a learning process and I had a lot of help. If you're curious about switching to jekyll yourself check out this site's README.html file (yes, this site has a read me file). At the bottom you'll see a list of resources that guided me in this process.

Here's a great article about how to post to github pages and still use custom plugins.


This post is part of a series: Switching to Jekyll from Wordpress
  1. From Wordpress to Jekyll 19 January 2014
  2. Deploying Jekyll on Heroku 30 January 2014

Filed in: Jekyll  

Comments: This is a tiny site and comment moderation is a pain. Let's use social links to have a conversation on a bigger platform: