MC's journal

gomdn: Yet another Static Site Generator

Yet another Static Site Generator (SSG), but this one is mine.

It's a stupidly simple Go program (wc says 229 lines), more like a hack, really, but I don't need something like Hugo. Most of the real work is done by the goldmark package, of course. This is mostly just a wrapper, deciding if something needs to be rebuilt.

I've been using a Perl script together with cmark (originally Markdown.pl) since forever. And before that the old txt2tags since 2001(?). I used plain Makefiles to regenerate only those files that had changed. This new Go program replaces all of them.

godmdn recursively goes through a series of directories. If a source file ending with .mdu (configurable) is found, it checks the target HTML file and rebuilds it if the source is newer. If the file doesn't end with .mdu and is newer than the target, it is simply copied.

https://codeberg.org/mchack/gomdn

I'm still using org-static-blog for the blog. The few galleries I have are of course made by my venerable Simple Gallery simgal script.


Written by MC on Prickle-Prickle, the 58 day of Confusion in the YOLD 3191 ().