Skip to main content

Module exporter

Module exporter 

Source
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.css plus index.html into out_dir. Creates the directory if missing. Returns the number of stories written.
export_subset
Re-export the subset of stories identified by ids. Empty ids means β€œre-export everything plus the index”. The shared style.css is 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 πŸ”’