Menu
#Configuration
#Full Example
docs({
dir: './docs', // required, path to markdown files
title: 'My Project', // required, shown in header and page titles
basePath: '/docs', // base route, default '/docs'
subtitle: 'API Docs', // text shown next to the logo, default 'docs'
version: 'v1.0.0', // version badge, shown instead of the subtitle
favicon: './docs/favicon.png', // png, ico, svg or webp
theme: {
preset: 'default', // built-in theme preset
accentColor: '#58a6ff', // overrides the preset accent color
logo: 'MY DOCS', // header logo text, default is the title
vars: { // CSS variable overrides
'--bg': '#0f0f0f',
'--font': '"IBM Plex Mono", monospace'
},
customCss: `.header-logo { font-size: 1.25rem; }`
}
})#Options
| Option | Type | Required |
|---|---|---|
| dir | string | Yes |
| title | string | Yes |
| basePath | string | No |
| subtitle | string | No |
| version | string | No |
| favicon | string | No |
| theme | object | No |
#Notes
basePathshould match the path you mount the middleware on. The favicon is served atbasePath/favicon.ext, and its path is read from where you run the server.
Configuration is fully typed, so your editor will suggest the options as you type.