mark↓ Example: Basic workflow
November 14, 2025 · View on GitHub
This example demonstrates the minimum steps required to index Markdown snippets and render them with the mark↓ runtime. For context about the project and other frameworks, see the monorepo overview.
Prerequisites
- Node.js 18+
- Dependencies installed at the repository root (
npm install) - A manifest generated by the CLI
Steps
- Author content – Add Markdown files under
content/snippets. Include YAML front matter for titles, tags, or custom metadata. - Build the manifest – From the repo root run:
Adjustnpx mark-down build content/snippets --outDir public/snippets--outDirto match your hosting setup. - Serve the app – Point your framework at the generated
snippets-index.jsonand consume it via the core runtime or the framework adapters for Angular and React.
Customising
- Swap in your own snippet directory by updating the CLI command and any manifest paths in code.
- Extend the example with additional frameworks by installing the relevant adapter package.
- Use watch mode during development:
npx mark-down watch content/snippets.
Refer back to the package READMEs for deeper API documentation and integration patterns.