Peter-John Lightfoot

Programmer | Architect | Solutionist

Deciding to switch from WordPress to Wyam

(image credit)

I started out this past weekend with the intent of updating the look and feel of my blog to something a little more modern (i.e. cleaner), but somehow the searches that I constructed (mostly aimed at alternatives to things I didn’t like about the old site) soon started leading me into the area of static sites.

Static site generators have been steadily gaining support and momentum over the last few years. Their most prominent benefit is, of course, the time it takes a web server to serve the pages that clients request. In the widely popular world of blog engines (mine runs on WordPress), every request runs a script that dynamically pulls together the different parts of the page, stiches them together, renders them as HTML and then serves them to the client. Static site generators, on the other hand, farm off most of this work to a build process that produces the HTML pages. Upon a client request, the server then simply returns the requested page. Way faster.

The other part of the work — dynamic content — is farmed off again to the other end of the pipeline — the client. Specifically, dynamic content is rendered into the HTML (or linked to from it) as client-side scripts and/or web service calls. Best of both worlds, indeed.

Back to my Saturday morning, and I happened across Wyam, a static site generator based in .Net — and a very solid product to boot! It was a breeze to get going, and the online documentation (the entire site is produced with the product — how ‘inception’!) is super useful. Being .Net, it supports Razor templates for theme layouts, and SASS for styling… right up my alley.

More than that, though, the product has taken a very fresh approach to transforming input documents into output documents, meaning that its architecture and design lends itself to so much more than blogging. For example, rendering documentation from xml-doc comments in source code.

Now, my blog has been growing (in bursts and spurts, mind you) for a number of years and, even as ‘light’ as it is (compared to some other — much more prolific — writers out there) still carries quite a lot of additional functionality, thanks in large part to the tremendously strong community and plugin ecosystem of WordPress.ORG — primarily for ‘peripheral’ things like SEO, commenting, accounts, contact forms, subscription, e-commerce etc.

Meaning that I did have to pause and consider the larger impact of a fundamental change like going from WordPress to Wyam… but I’ve decided to bite the bullet and go for it. The clincher for me has been the idea that I can manage my posts as source files, with revision control in Git, and build a continuous delivery pipeline to rebuild the site whenever I commit a change. What a joy!

It does, however, mean that getting a few of the basic extra features (on top of simple blog posts, that is, like commenting and subscriptions) sorted out will take a bit of time. The MVP for me is about my readers’ experience. As soon as I have the basic site ready, I’ll post an update. Until then, this will be my front page.

As always, let me know if there’s anything specific that you want to bring to my attention.