It's been a little while since I've done a todo post for Wyam, so I figured it was about time. In this post I'll show you how to make a nice one-page GitHub profile site. We'll use the GitHub module to fetch data from GitHub about your account and then render it using a Razor view. The whole thing is about 50 lines of code between the Wyam config file and the minimum Razor template (not counting a pretty style, which we'll add at the end).
After a little over two years of development, I'm thrilled to announce that Wyam 1.0 is now released! Wyam is a .NET static generator that unapologetically places an emphasis on flexibility and extensibility. It's the static generator I wanted two years ago and I'm thrilled that so many have also found it valuable and interesting along the way.
When I started working on Wyam about 2 years ago, a primary design goal (probably the primary goal) was to create a general-purpose static generator that could be easily adapted to any sort of content, from the most complicated web site to output that isn't web-based at all. I was frustrated with both the lack of a popular and robust generator in the .NET ecosystem (why should Ruby and Node get all the fun?) and also with the limitations of the generators that do exist on other platforms. Nearly all of them favor strong conventions and patterns and while many are extensible, creating experiences that differ too greatly from what's expected becomes challenging fast (a notable exception to this is Metalsmith, which is similar in spirit to Wyam).
I'm going to try and blog about Wyam a bit more. As more folks start using it, I'm getting some really interesting questions about how to do things. Given how flexible Wyam is there's almost always multiple answers too, which makes exploring these questions a great exercise in discovering various features. In today's post I'll look at how to add syntax highlighting to code blocks in generated content.
I've seen an interesting static site use case come up a few times recently where someone wants to use a static generator along with an existing dynamic site. The idea is that they would generate certain resources statically at build-time of the dynamic site and then only rely on the dynamic runtime for pages that really need it. I've long suspected that Wyam would be great in this role, particularly for ASP.NET MVC sites given that it can read the same Razor layout files. I finally got motivated enough to give this a try and will detail how to do it in this blog post. It turns out it's not hard at all and works really well once you've gotten everything set up.
I recently launched a new static site generator, and I figured what better test of whether it's ready for widespread use than to convert my entire blog to use it. Given that this blog was originally built with ASP.NET MVC, it should be a good fit for converting over to a Razor-based static site generator. The process was actually easier than I thought it would be and suggests that Wyam is already ready for production use on personal sites, blogs, etc.