As I wrote last week, I decided to ship this next set of features as 0.5.1 rather than 0.6.0, given that 0.5.0 was released last week, and 0.4.0 was released just three weeks ago. There are technically two breaking changes in 0.5.1: 1) namely removing the rheo-context variable in favour of a rheo-context() function, and 2) resetting footnote numbers by default across vertebrae. The other changes in the release gravitate around fluffing the rheo-context().spine data structure up with the information configured using #set document statements in each Typst vertebra. This makes a lot more context regarding Rheo’s spine available, which also means that it can be abstracted away in packages like blogfeed (newly created this week), which now powers this site’s homepage.
Currently, the content in rheo-context() is powered by a ‘second’ shallow parse of the Typst files in Rheo, rather than in Typst’s compilation itself. This is probably unnecessary, as I’m pretty sure that different documents in a Typst bundle can introspect each other’s metadata. So the better solution would be a Typst-native construction, which would also avoid the three-way type transliteration (Typst types represented in Rust for Rheo, which then casts them back to Typst types again) that we’re doing currently. But the preliminary shape of what rheo-context() provides is now in place, which means that I can experiment with building out a Zettelkasten-like package that makes use of it, something that I’ve been meaning to do since I started writing weeknotes almost two months ago, now.
Among the other changes that landed was an adjustment to the way Rheo’s default stylesheet gets injected. It now shows up in the build through the Rheo asset system, which means as an external CSS file linked in the HTML header, rather than being inlined in the HTML as it was previously (for relatively arbitrary, historical reasons). This resulted in a glorious PR to rheo-tests removing some 14k lines of repeated code, as we store full HTML references in the test harness.