Publishing

This is a kind of follow-up to my ramblings about looking for a new CMS, spurred on by looking at some (semi-)static site generators.

The idea is really nice. You build all the pages of your site as static HTML and serve them. The advantages are huge! You can use a geo-distributed CDN. Your attack surface is massively reduced. You have no contention for database resources, and the number of moving pieces in your stack are now fewer in number.

But, there’s always a trade off. And this is where I get stuck. One of the great things about the web is that it’s dynamic. I can serve you a page with my latest tweets, and the last film I saw and a dozen other things just by the magic of a few lines of code. Not to mention the end-benefit to the user of things like search and forms.

There are ways around this, via iframes (icky but fairly well supported) and JavaScript (yey, the page has loaded, now the page can load, sigh). But I’m not going to go down this route. I want to serve pages with many dynamic elements ready.

So, back on topic, I’ve started looking at Jekyll, Metalsmith, Phrozn, and the billions of other static site generators (SSGs) out there. And I keep on coming back to one thing.

Yes, they’re good for a few pages. Maybe even a few dozen. But there are over 1,000 pages on HybridLogic. And that’s not counting archives and some of the more bespoke data-pages. Even a cursory test with some of these systems show that the render time is in the minutes. Minutes.

There are upsides. Most of the SSGs use raw files for their data, which means git handles many of the versioning issues for me (which in itself presents a problem because exactly zero real-world clients would grok how to use git). And previewing the entire site is simply a case of pushing to a QA CDN. But you’re still trapped with no functionality bar a JSON API.

So instead I’ve gone the other way. I don’t want static pages. I want something that supports a reverse cache like Varnish out of the box. Good caching headers and automatic purges (with the former something all apps should do regardless).

Which is all a long way of saying it seems like a static site generator won’t be the one I pick.