Using Wyam

A new static-site blog using Wyam

Published on 09 November 2015

I've been meaning to create a blog for a long time but never found a system with the right combination of features (power vs flexibility vs learning curve, cost, technology stack, etc). CMSs (Wordpress, Drupal, etc) were always way too much faff and most static site generators required the installation of numerous languages / run-times / sdks, etc.

Then I found Wyam.

Being .NET based it could be used from my day-to-day development machine and, by cleverly leveraging the Roslyn compiler platform, can be set up to be as simple or flexible as desired. A quick flick through the module and API pages and I knew I'd found a potential candidate for my statically generated blog.

Being a... ahem... pragmatic developer with somewhat dated web skills I decided to take the path of least resistance and copy someone else's blog layout. Afterall, imitation is the sincerest form of flattery, right? As such, I contacted Dave Glick - the most-excellent author of Wyam - to see if he would mind me 'borrowing' the layout he used for his blog. He quickly replied to my cheeky request and said he didn't mind at all if used his layout, even refusing my offer of attribution (which I hope this blog post somewhat makes up for).

With the all clear, I downloaded the latest version of Wyam, cloned the Wyam repository, invoked Wyam to generate an example site... and got an exception.

Another quick chat with Mr. Glick revealed that the project is iterating quickly and currently in a "move fast and break things" mode. Fortunately the issue was already resolved in the development branch so, after local build of Wyam, I managed to successfully generate the example sites.

"Now for some blatant plagiarism with his blog" I thought to myself but again, after cloning his (generously shared and CC licensed) blog, asking Wyam to generate the site threw an exception. This time, a short bit of call-stack sleuthing revealed another breaking change which was easily resolved by examining the Wyam module documentation.

Once more with feeling and ét voila, a MVB (Minimal Viable Blog).

All in all, not a bad experience with an early beta of a very clever project. Moving forward, I actually hope to do very little with Wyam other than post blog entries but will certainly endeavour to keep up to date with Wyam and share my experiences here.

If you're looking for a flexible yet powerful .NET based static-site generator, go check out Wyam. If you experience any problems with it I'd definitely recommend posting an issue on Github, Dave seems to be very on the ball responding to issues (and extremely friendly to boot).