Install
npm install -g docsmintpnpm add -g docsmintpip install docsmintNote
Node.js is required in all cases. The Python package invokes the Node.js CLI.
Prerequisites
- Node.js 22+
- pnpm or npm
Initialize a project
From your project root:
docsmint initThis creates:
docs/
├── docsmint.config.ts
└── src/
└── content/
├── docs/
│ └── getting-started.md
├── writing/
│ └── hello.md
└── pages/
Start the dev server
docsmint devDefault URL: http://localhost:4321.
How the architecture works
DocsMint keeps your project content-only while engine internals stay hidden:
- The CLI prepares
docs/.docsmint/as an internal workdir. - The bundled engine from
@docsmint/engineis installed there. - Your
docs/src/content/anddocs/docsmint.config.tsare linked into that runtime. - Astro runs inside the workdir, not in your app root.
You own content and config. DocsMint owns rendering internals.
docs/
├── docsmint.config.ts ← your config (name, nav, branding, …)
└── src/
└── content/
├── docs/ ← docs pages (.md / .mdx)
├── writing/ ← writing posts (.md)
├── pages/ ← custom pages (.md)
└── public/ ← static assets served at site root
├── favicon.svg
└── favicon-white.svg
Branding
The branding config key is fully opt-in. When set, DocsMint renders a monochrome icon beside the site name in both the homepage heading and the nav, and injects your favicon into every page <head>.
branding: {
icon: '/favicon.svg', // adaptive icon in UI (light/dark)
favicon: '/favicon-white.svg', // browser-tab favicon
}SVG icons are inlined for perfect currentColor theme adaptation. Raster icons use CSS filters. Raster favicons are converted to monochrome via a canvas script that updates live on theme change.
Commands
docsmint initscaffolddocs/docsmint devrun local serverdocsmint buildbuild static output todocs/.docsmint/dist/docsmint previewpreview the production builddocsmint cleanremovedocs/.docsmint/docsmint deploy [target]build and prepare deployment artifactdocsmint context [output]generate an LLM-friendly content snapshot
Next steps
- Configuration — typed config and navigation policy
- Writing content — markdown, frontmatter, MDX components
- Components — Callout, Tabs, FileTree, Mermaid, and more
- Deploying — host-agnostic deployment workflow