Jekyll as a replacement for SSI

1366275114000 » Tagged as: jekyll , Wordpress

This site does not use server side includes.  Banish the thought! However this site does use PHP as if it was SSI. The site with the LAMP was first created in 2002, at that time CMS weren't as advanced as they are now. In spite of the millions of hours that have been invested in CMS by so many developers it's still a load of crap, so you can imagine what it was like at that time (or you might have had the misfortune of using a CMS at the turn of the century). You can read my rant from 2005 here.

To cut a long story short, the part of the site that's not under wordpress is created by using using PHP to each out the headers and footers and what not. Which means there is are a few lines of PHP code at the top of each page, a few lines a the bottom and in between it's all HTML. Initially I toyed with the idea of using a regex to convert this mess to markdown, but regex sucks. It it dawned on me that modifying the PHP code that acts as the template to generate markdown instead of HTML would be far easier, and that's exactly what I did.

Jekyll supports both pages and posts so the non blog part of the site can easily be converted to jekyll pages. As to how to deal with the Wordpress powered blog; well dozens of experiments were done and it's all covered here in the archives.

comments powered by Disqus