MoonBit document platform – Document model, Markdown rendering, and page generation
Dependencies
pnpm install --frozen-lockfile
pnpm run verify:vendored-workspacepnpm bump 2026.M.Xpnpm install --frozen-lockfile
pnpm -r build
pnpm publish:packagesgit tag v2026.M.X
git push origin main --follow-tags{
"schemaVersion": "papyr.normalized-document.v0",
"id": "docs/intro",
"path": "docs/intro.md",
"frontmatter": {
"title": "Intro",
"tags": ["guide"]
},
"blocks": [
{
"type": "heading",
"depth": 1,
"text": "Intro"
},
{
"type": "paragraph",
"children": [
{ "type": "text", "value": "Hello" }
]
}
]
}{
"id": "intro",
"title": "Intro",
"blocks": [
["Heading", { "id": "b1", "level": 1, "content": [{ "text": "Intro", "marks": [] }] }]
],
"meta": { "source": "markdown" }
}moon run src/cmd/main --target native -- markdown_to_document '# Intro' intro
moon run src/cmd/main --target native -- validate_document '{"id":"intro","blocks":[]}'{"ok":true,"command":"decode","documents":[...]}{"ok":false,"message":"...","diagnostics":[...]}{"documents":[...]}moon run src/cmd/main -- markdown-to-json '# Intro' intromoon run src/cmd/main -- json-to-markdown '{"id":"intro","title":"Intro","blocks":[["Heading",{"id":"b1","level":1,"content":[{"text":"Intro","marks":[]}]}]]}'{"ok":true,"tool":"markdown_to_document","result":{},"diagnostics":[]}{"tool":"preview_document","input":{"document":{"id":"intro","blocks":[]}}}MoonBit document platform – Document model, Markdown rendering, and page generation
Dependencies