Documentation site generator

Create joyful documentation sites.

Write pages in Markdown and layouts in plain HTML. Postdoc builds a fast static site that changes pages without reloading, can work offline, and is tested for accessibility on every page.

Get started
  ---
  title: Monadology
  ---

  # Welcome to {{title}}

  I am a windowless monad.

Features

Everything a documentation site needs, in one CLI.

  • Storymaps

    A map that moves as readers scroll, with tracks that draw themselves and layers that change by date.

  • Accessibility, tested on every page

    postdoc test checks every page against WCAG 2.2 AA, in light and dark mode.

  • Layouts in plain HTML

    Pages in Markdown, layouts in HTML with a few EJS tags. No Vue or React to learn.

  • Markdown with extras

    Syntax highlighting, code groups, callouts, Mermaid diagrams and math, all built in.

  • API docs and search

    An API reference from your JSDoc comments, and search that runs in the browser.

  • Navigation without reloads

    Static HTML pages that change without a reload, and announce themselves to screen readers.

See it in action

export default {
  contentPath: './docs',
  outputPath: './out',

  appSettings: {
    name: 'My Docs',
    navigation: [
      ['Guide', '/guide/'],
      ['API', '/api/']
    ]
  },

  markdown: {
    syntaxHighlight: {
      theme: { light: 'github-light', dark: 'github-dark' }
    }
  },

  // API reference pages from JSDoc
  apidocs: {
    source: './src'
  },

  // Keep working offline
  pwa: {
    enabled: true
  },

  // Check the phone layout too
  nightwatch: {
    pageChecks: {
      widths: [1280, 390]
    }
  }
};
---
title: Install
---

# Install

Postdoc needs Node.js 22.18 or newer.

::: code-group
```sh [npm]
npm install --save-dev postdoc
```

```sh [pnpm]
pnpm add --save-dev postdoc
```
:::

::: tip
Run `postdoc test` before you deploy.
:::
# Create a site and start writing
postdoc init --name my-docs
cd my-docs
npm start

# Check every page in a real browser
postdoc test

# Build the static site into out/
postdoc build

# Look at the build before you deploy
postdoc preview
postdoc.config.js install.md setup.sh

Ship docs, not complexity

postdoc init creates a working site with layouts, dark mode, search and sample pages, so you can start writing straight away.

postdoc test builds the site and checks every page in a real browser. Your own Nightwatch tests run in the same pass, and a failure fails the CI job.

The build is plain static files, so it runs on GitHub Pages, Netlify, Vercel or any web server, with no runtime and no lock-in.

Ready

to get

started?

Try it in your browser