How To: WordPress to Jekyll
paulstamatiou.com
paulstamatiou.com
A few months later, I switched from Jekyll, which is written in Ruby, to http://blogofile.com, which is very similar to Jekyll, but written in Python. The second switch was prompted by one of the parsers in Jekyll repeatedly choking on bad markup left over from Wordpress, but failing to reveal the location of the parse errors.
I've subsequently used Blogofile for a larger site that includes both static pages and a blog. It's worked extremely well.
choking on bad markup left over from Wordpress,
but failing to reveal the location of the parse errors.
I have this one nagging issue where it says I have an unclosed liquid highlight tag but I have no idea what post it's in.Fortunately, the switch to another blog compiler is easy once you've got everything as flat files.
I am not against Jekyll. It sounds like a cool project. But I'm just curious if moving from WordPress to Jekyll really is worth doing, even if you're a developer/geek and like to tinker with software.
If you need to do it for speed, consider using Varnish to cache most everything. Items you cache will probably be at least as fast to serve as static html.
(Btw. this reminds me of craigslist way of publishing entries).
Now I can open my site in Textmate, make my changes, and use git to push to my server all in less time than it would take to do the same in WP. I don't give anything up(you can have archives, tags, and related posts in Jekyll) by switching and gain quite a bit of flexibility. Jekyll also fits into how I like to do things(ruby/textmate) which is incredibly important to some people.
So yes there are cases where Jekyll makes more sense. Depends on the user.
Mind you, I'm not trying to advocate WordPress, but when I say WordPress you can substitute it with any simple, easy to install CMS.
I used to create my own CMS just for my blog. But then I needed some new features, but didn't have time to write them. So I just switched to WP, where most features are just an addon away. The only problem I have is that I need to update it whenever a security bug is discovered. For that security I see the advantage of Jekyll.
For infrequently updated sites where there aren't multiple authors, wordpress is overkill and not worth the security concerns, IMO.
Interestingly, Jekyll does give you, at least if you are the right kind of person, a sense of satisfaction that seems to make a lot of people, myself included, want to write about the fact that they're using it (albeit not normally in as much detail).
And that same sense of satisfaction comes whenever writing a post or editing the site - or even when reading a blog like this. I guess it's just one of those things that's really easy to fall in love with.
I switched off of it because WordPress has a lot more templates available, and my web design skills just aren't that great. But, I often think I'd like to give it another go. It is more fun to write in vim than a web based editor.
Static files are definitely the way to go.
I'd use a hosted service, but I haven't found one that can properly import my posts and comments. Is there such a thing? I know Posterous is close, but I don't think they import comments.
I still love Mint, too. I wish someone would build a hosted version of something just like it. If you're thinking the same thing and want to team up, drop me a line ;)
As to comments, on my Jekyll blog I opted not to bother with comments, but yeah, Disqus (or equivilent) is probably the best option. A possible second option would be to tell Apache to run all the .html files through PHP, and use PHP to add in a database-driven comments system. Sure, it won't be as fast as HTML-only, but it will still cut down the load time by not using any database queries for the rest of the site.
- Ruby gems
- Git
- Liquid Templates
- Yaml
You can get a WordPress blog running in minutes knowing a lot less.
That said, WordPress successfully powers millions of sites and certainly isn't going away. And since it is dynamic, you get some nice features that would be difficult to replicate with the static site approach. If it works for you, I'd stick with it without worry.
Finally, you can always publish a static clone of a blog created in Wordpress. I've done this before on production sites and it worked well. An extra step, but I got the speed I was after without having to migrate or recreate the site.
Funny enough, I was just looking into moving from WordPress to Jekyll myself. Blogs really should be just static files.
Hey, Stammy, and like that you summed up in a neat little package pretty much every anxiety I've had.
Great article.
For a blog, all that really needs to be updated (aside from generating the new post) are index / archive / tag pages, right? Can't you just rebuild them, while leaving old posts alone?