One source, several projections
Mermaid source for One source, several projections
flowchart LR
source[Markdown source] --> check{Check compatibility}
check -->|pass| render[Compile and render once]
check -->|findings| revise[Revise source]
revise --> check
render --> html[Standalone HTML]
render --> site[Static site]
render --> pdf[PDF or deck]
Compile once, then choose the projection. The host still owns its frame, metadata, assets, routes, and publication destination.
A quick tour of the outputs
| Output | Best for | Typical command |
|---|---|---|
| HTML | One browser-ready document | margo html guide.md --output guide.html |
| Site | Linked pages with validated routes | margo site ./docs --output-dir ./dist |
| A paginated document | margo pdf guide.md --output guide.pdf | |
| Deck | Experimental presentation projection | margo deck talk.md --format html --output talk.html |
Run margo serve ./docs --open while editing. It provides loopback preview and
live reload; it is not a production server.
Markdown stays expressive
Headings, links, tables, code, images, Mermaid, and optional Goshtoso charts stay in Markdown. This illustrative output mix makes the projection choices visible; the exact-data table keeps every value available without interaction:
Exact pie values
| Series | Sector | Value | Share |
|---|---|---|---|
| Illustrative output mix | HTML | 40 | 40.0% |
| Illustrative output mix | Site | 30 | 30.0% |
| Illustrative output mix | 20 | 20.0% | |
| Illustrative output mix | Deck | 10 | 10.0% |
| Series | Category | Sample | Value | |
|---|---|---|---|---|
| HTML | 40 | HTML|40 | ||
| Site | 30 | Site|30 | ||
| 20 | PDF|20 | |||
| Deck | 10 | Deck|10 |
Static SVG remains the default. This example loads the local interactive runtime,
and PDF output can still include the exact chart data for print readers. The
landing page is an HTML/site projection; margo deck uses static charts in both
deck formats and documents that boundary in its chart guide.
Trust boundaries stay visible
Checks report invalid links, images, policy fields, heading structure, and engine requirements with a stable diagnostic and a next action. Raw HTML and iframe embeds require host policy; a document cannot grant itself capabilities. Offline builds keep assets local, while deployment and release remain separate lifecycle actions.
Is Margo a fit?
Good fit
- Teams keeping Markdown in Git while publishing several projections.
- Go applications that need a compiler with host-owned navigation and assets.
- Documentation sites that value deterministic, inspectable output.
Not a fit
- A hosted CMS, collaborative editor, or production web server.
- A workflow that needs Margo to download browsers or deploy generated files.
- A presentation system that requires a stable deck contract today; deck output remains experimental.
Choose your next step
- Start with the CLI guide — commands, configuration, and operational boundaries
- Continue with the Module guide — compiler APIs and host-owned composition
- Browse the Schemas — versioned contracts and rendered property trees
- Explore Fenced types — diagrams, charts, schemas, and code
- Trace dependencies and upstream boundaries
