My SSG
What follows is a mandatory How This Site Is Built blogpost. Originally written for a comment on lobste.rs.
In my SSG, I don’t use frontmatter indeed, and have the files content be just normal markdown. And I keep my metadata (date and tags) in the filename, as:
<DATE_ISO>-title-slug.<@TAGS>.md
e.g.:
20240611-1826-forge-horizons.@review.@ironsworn.@bud.md
which, when rendered, is then stripped down just to the title-slug
part, whereas <DATE_ISO>
and <@TAGS>
are extracted, for a timestamp and a tags list respectively:
Also, I stole the core idea of the rest of the SSG from the Soupault SSG: I don’t use an (increasingly complex) templating language; instead, I render the Markdown to HTML, then use Lua+Rust to further operate on HTML, mashing together pure HTML page templates with the rendered HTML of the Markdown contents. Because Lua is Greenspun’s Tenth Rule embraced and accepted.
Is the HTML-manipulating code readable? Nope, sorry. I wish it was. But at least it is relatively small, and the inputs are understandable to me, while in most SSGs I found, the DSL and conventions were always confusing and convoluted to me.