Expand description
Headless story renderer (DEV-07 / AUT-150).
Hosts the actual HTML emission for stories + the index cockpit.
Both the one-shot ui-export-stories binary and the long-lived
render-worker binary call into this module β the former so a
single cargo run produces the full asset set, the latter so a
warm process can re-render targeted story ids without re-linking
between iterations of the dev loop.
ConstantsΒ§
- INDEX_
SCRIPT π - STYLE π
FunctionsΒ§
- escape_
html π - export_
all - Export every shipped story plus
style.cssplusindex.htmlintoout_dir. Creates the directory if missing. Returns the number of stories written. - export_
subset - Re-export the subset of stories identified by
ids. Emptyidsmeans βre-export everything plus the indexβ. The sharedstyle.cssis rewritten on every call so a CSS edit picked up by the worker still propagates. - render_
index π - story_
count - How many stories are currently registered (for
WorkerReply::Hello). - write_
story_ πhtml