docsmint
On this page

Install

npm install -g docsmint
pnpm add -g docsmint
pip install docsmint

Note

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 init

This creates:

docs/
├── docsmint.config.ts
└── src/
    └── content/
        ├── docs/
        │   └── getting-started.md
        ├── writing/
        │   └── hello.md
        └── pages/

Start the dev server

docsmint dev

Default URL: http://localhost:4321.

How the architecture works

DocsMint keeps your project content-only while engine internals stay hidden:

  1. The CLI prepares docs/.docsmint/ as an internal workdir.
  2. The bundled engine from @docsmint/engine is installed there.
  3. Your docs/src/content/ and docs/docsmint.config.ts are linked into that runtime.
  4. 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 init scaffold docs/
  • docsmint dev run local server
  • docsmint build build static output to docs/.docsmint/dist/
  • docsmint preview preview the production build
  • docsmint clean remove docs/.docsmint/
  • docsmint deploy [target] build and prepare deployment artifact
  • docsmint context [output] generate an LLM-friendly content snapshot

Next steps