Announcing Wyam

A modular static content generator built on Roslyn, Razor, and rainbows.
Published on Sunday, June 28, 2015

I am very proud to announce my newest project, Wyam. It's a static site and content generator built from the ground up to be modular and flexible.

Here's the thing: I like static site generators. I've been thinking about this problem for a long time (as in, many years). In fact, I did a roundup of .NET static site generators not too long ago. And while there are a lot of generators out there, none of them really fit with the way I think about the problem. I don't want to follow a prescribed notion of what sort of content I'm creating or follow assumptions about the location of files. I wanted a static content generator that is designed from the ground up to be flexible, even if it means making it slightly more complicated to configure. There are some generators that come close (I'm personally fond of the concepts in Metalsmith). I'm also a .NET developer and while there are a couple good static site generators in the .NET ecosystem (Pretzel and Sandra.Snow come to mind), I certainly don't think we've hit peak generator in that world as we have in, say, JavaScript.

More to the point, I'm a developer. You're (probably) a developer. Why do most static site generators ignore that the people most likely to use them are developers? I'm all for making things easy, but I also want the ability to use my development skills to create the site that I want to create. By making lots of assumptions and abstracting away so much of the process, I get the feeling a lot of the generators out there are try to cater to my mom. Except my mom will never use a static site generator. If I told her to "generate a blog with Jekyll" she'd say "that's nice dear, why don't you talk to your father about that."

While I've had ideas about how I would make such a thing for a long time, it wasn't until recently that the tools to realize my vision finally became available. Specifically, maturity of the .NET Compiler Platform has finally made it practical to create applications that can compile their own code. This meant that in addition to providing lots of great abstractions and extensibility points to make static content generation easy, I could also provide a mechanism to configre and extend the process for more flexibility.

Most of that flexibility is evident in the way you configure Wyam. Wyam configuration files are written in C#. You can make extra classes and helper methods. You can create new base pages for the Razor module. You can use delegates to configure modules. Whatever you need it to do, it can do, because you can write the code to do it.

But don't get me wrong, it also does a lot for you up front. Here's a list of the current features:

In fact, to dogfood Wyam I generated the Wyam.io site with it (meta!). I also refactored this blog to be generated (a post on that coming soon). In the near future, I'll also be adding many more modules including JSON and Liquid (check out the GitHub issues for a look at upcoming features). I'd also like to explore using Wyam for non-site things like generating documentation or eBooks. I would love to attract developers of all backgrounds, but my greatest hope is that Wyam can catch on as a kind of anti-Jekyll for the .NET crowd.

Oh, and about the name. Wyam is a Native American name for the Celilo Falls area and is also roughly translated as "echo of falling water" or "sound of water upon the rocks". Which sounds kind of like static. For a static site generator. Get it? I also liked the image of water going over the falls as one thing then going through a transition as it emerged at the bottom as something else. Plus the name just sounds cool, and the domain was available. It's also very searchable (looking at you Visual Studio Code).