Progress. The upcoming Asteracea mdBook now executes components examples during build and embeds the resulting static HTML in a new code block.
The input is at https://github.com/Tamschi/Asteracea/blob/3165940ffd24dc88c16aa454e716216ae0e95446/book/src/chapter_1.md , with setup code nearby.
To be honest, I'm not sure how far I'll clean this part of the project up for now. I think I'll try embedding live examples somehow (complicated build process...), but first I'd like to get some writing done.
Fediverse-compatible! Follow me using Pleroma, Mastodon or any other ActivityPub-compatible software.