End-to-end demo of the @reactwright/markdown workflow.
sample.md is a short essay with YAML frontmatter (title, author,
template, references). Run:
pnpm mockupThe script invokes the reactwright-md CLI on sample.md and writes
markdown-sample.html + markdown-sample.pdf into build/mockups/.
The frontmatter template: essay selects @reactwright/template-essay;
override with --template=ieee or --template=report on the command
line if you want to see the same content wrapped in a different
template.
Workflow:
- The CLI reads
sample.mdand parses it viamarkdownToReactwright, producing a<document>React element plus a frontmatter object. - The frontmatter
templatefield selects the Reactwright template package; the CLI dynamically imports itsTemplateexport. - Content + template flow through the engine's existing render pipeline (content IR → resolve → HTML → PDF).