by wolfgang42 · 7y ago · 0 comments
1. Look at the huge list of open-source static site generators (literally hundreds![1])
2. Try some out, and fail to find one that works exactly right.
3. Start writing a new one that fits better.
4. Gradually extend it and make it more general.
5. Get excited about how useful it is, and publish it as an open-source project so others can use it, adding it to the already enormous list.
6. Someone else starts at step 1.
[1]: https://www.staticgen.com/
I've taken to just building a new one one to meet whatever my immediate need is, and developing a sort of mental toolkit of techniques rather than trying to smush an existing program into the particular requirements of a specific project. You can get surprisingly far with just a handful of lines of code.
Another fine alternative is just use Wordpress!
Not nearly as fast as Hugo or Jekyll (~5 minutes to generate a 1300 post blog), but a nice alternative if you want to keep using a CMS and don't want to expose it to everyone.
I wrote a (perl-based) blog-compiler for my own site https://blog.steve.fi/ and recently rewrote it in golang to get the advantage of easier installation and faster generation.
Generating a thousand blog posts, over five+ years, shouldn't take more than a second. My Perl code used to take 30 seconds to rebuild and upload my site (via rsync) complete with comments, tags, etc. But the new rewrite takes 3 seconds to do the same job. So it was a good rewrite even if I'm not even going to pretend it is a general purpose utility any more.