#gutenberg, #Rust, #blogging
When I first created this site I wanted to get it live as quickly as possible. Hexo, a blogging framework written in Node.js, seemed like the perfect tool. At the time I was rather interested in Node.js, so it seemed natural to use a framework rooted in that community.
By the time of my last post I'd become increasingly disinterested in Node.js and much more interested in Rust and its community. It was mostly procrastination, but I convinced myself that using a tool written in a language I didn't use often directly contributed to the paucity of posts here, so I finally decided to ditch Hexo.
Of course, I needed a suitable replacement. I wanted it to
Fast and flexible are nebulous requirements. Most static site generators are more than fast enough since I'm not generating a site with hundreds of pages (yet). My early experience with Hexo taught me that while having a bunch of features out of the box is nice flexibility is more important. I needed to be able to choose my own deployment mechanisms and structure my site the way I wanted to.
I don't personally use an RSS feed reader, but I know friends of mine do and they've asked me to support that (here ya go). I sure as heck didn't want to generate an RSS feed myself.
Live reloading and Markdown support were non-negotiable requirements. The write, build, and reload cycle is too tedious to forgo live reloading. I simply didn't want to use a markup language other than Markdown because writing it is effortless for me at this point.
I surveyed the landscape, but didn't find anything to my liking, so I procrastinated even more. Then I happened across an article linked from an orange website introducing Tera, a template engine in Rust. When I saw that the author drew inspiration from Python's Jinja2 templating library I got really excited.
I tried my hand at writing my own static site generator in Rust. I managed to get a rudimentary POC using Tera operational just in time for Vincent Prouillet, the author of Tera, to announce Gutenberg. It met all my replacement criteria, used the templating engine I was interested in, and was written in Rust!
Once I found Gutenberg I attacked fixing up my site with vigor. I wrote my own templates, learned a little Sass, and even managed to make a small contribution to Gutenberg. Hexo made my site largely a black box, but now there isn't a line of the source I haven't touched.
I also had time to add custom 404 Not Found and 50x Server Error pages. If you're interested in more little details, you can find the source for the redesigned site on GitHub.
This would not have been possible without Vincent's hard work on Tera and Gutenberg. I also borrowed a great deal from Alex Sun's vida Jekyll theme in writing this site's Sass. I've learned a lot from both of them. Thanks!
This site is in a much better place than it was a year ago. I understand it better and I'm more motivated to continue working on it, so expect more posts!