synchro wrote: Monday, 13 January 2025 @ 22:31 EST
wait omg this is really damn cool! i don't ever think i've seen something like a static site generator that's XML and makefile based. i might have to give this a try even though i don't know XML stuff at all (<-- can barely make an RSS feed from scratch lol)
Prior art is
Shrine-XSLT, which was my first attempt at doing this sort of thing with X·S·L·T (and might be more comprehensible lol); I did a lot of Pandoc+Makefile stuff before that. I really like (G·N·U) Make as a basis for generating static websites because it’s broadly available and only regenerates what you need. You can do a lot with it if you can figure out how to make good use of its features, and thankfully the
G·N·U Make manual is very comprehensive.
Initially, the goal was to have a minimal and easy means of inserting headers and footers into pages without all of the weight of a traditional static site generator, but as I’ve gotten more comfortable with X·S·L·T the scope has grown somewhat. In line with
my fifth programming resolution for 2024 I’ve tried to commit fully to forward‐thinking and easily‐transformable formats, of which X·M·L is near the top of the list, mostly out of exhaustion from ever having to migrate anything. So I ask myself “what is the easiest way to represent this in X·M·L” and then “how do I transform that into something which is durable and future‐proof” and then “how do I transform
that into a use·able webpage”, which is the situation with things like
https://vocab.ladys.computer (
source) which starts out as a simple, bespoke X·M·L dialect which is easy to write and lint with a
D·T·D, is transformed into an R·D·F representation which is future‐proof and can be loaded in things like
Protégé, and then is transformed again from there into all of the numerous X·H·T·M·L pages which are hosted on that site.
This is a lot better than my previous solution to this problem, which was built in Jekyll with a bunch of Yaml and Markdown and Liquid templating and simply was not ever portable to any other build system, even though I hated Jekyll and cringed every time I had to use it. Using X·M·L means that if I ever change how I do things, I just need to write a transformation to convert the old files into the new files and that’s a lot more straightforward.
Anyway, I do recommend learning about X·M·L and X·S·L·T, even though the X·M·L specification is hard to read and nobody has good learning resources for either anymore. (Only version 1.0 of either is relevant to the present day, because that’s all browsers or tools like
libxml2
/
xsltproc
ever implemented, even tho there is an X·M·L 1.1 and an X·S·L·T 2.0 & 3.0.) So, let me know if you encounter any stumbling blocks there, because it’s entirely reasonable. The
examples section at the end of the X·S·L·T specification might be a reasonable place to start; if you can figure out how those work then you have the broad grasp of things.