Config Reference
Doom extends Rspress configuration with additional options for documentation sites. Configuration can be provided in YAML, JSON, or JavaScript formats.
Configuration Files
Doom searches for configuration in this order:
doom.config.yaml / doom.config.yml
doom.config.js / doom.config.ts
doom.config.mjs / doom.config.mts
doom.config.cjs / doom.config.cts
Basic Configuration
# doom.config.yaml
title: My Documentation
lang: en
root: docs
outDir: dist
themeConfig:
sidebar:
/:
- text: Getting Started
link: /getting-started
Core Options
title
Site title displayed in navigation and browser tab
title: Doom Documentation
lang
Default language of the documentation
root
Root directory containing documentation files
outDir
Output directory for built files
base
Base URL path for the site
prefix
Prefix for the documentation base path
Doom-Specific Options
sites
Multiple documentation sites configuration
sites:
- name: v1
version: 1.0
base: /v1/
- name: v2
version: 2.0
base: /v2/
reference
External documentation references to import
reference:
- repo: kubernetes/website
branch: main
path: content/en/docs
target: k8s-docs
Auto-sidebar generation options
sidebar:
collapsed: true
collapsible: true
api
API documentation plugin configuration
api:
openapi: ./openapi.yaml
outputDir: api
permission
Permission management configuration
permission:
roles:
- admin
- editor
- viewer
translate
Translation configuration
translate:
systemPrompt: |
Translate technical documentation professionally
userPrompt: |
Maintain consistent terminology
lint
lint:
cspellOptions:
words:
- Kubernetes
- Rspress
ignoreWords:
- kubectl
algolia
Algolia search configuration
algolia:
appId: YOUR_APP_ID
apiKey: YOUR_API_KEY
indexName: docs
siteUrl
Full site URL for sitemap generation
siteUrl: https://docs.example.com
editRepoBaseUrl
Base URL for “Edit this page” links
editRepoBaseUrl: https://github.com/user/repo/blob/main
export
PDF export scope configuration
export:
- name: user-guide
scope:
- guides/**
- tutorials/**
- name: api-reference
scope:
- apis/**
onlyIncludeRoutes
Glob patterns of routes to include (whitelist)
onlyIncludeRoutes:
- guides/**
- api/**
internalRoutes
Glob patterns of internal/draft routes to exclude
internalRoutes:
- drafts/**
- internal/**
- wip/**
releaseNotes
Release notes configuration
releaseNotes:
enabled: true
path: /release-notes
Theme Configuration
Sidebar navigation structure
themeConfig:
sidebar:
/:
- text: Getting Started
items:
- text: Installation
link: /installation
- text: Quick Start
link: /quickstart
- text: Guides
items:
- text: Basics
link: /guides/basics
themeConfig.locales
Multi-language configuration
themeConfig:
locales:
- lang: en
label: English
sidebar:
/:
- text: Guide
link: /guide
- lang: zh
label: 中文
sidebar:
/zh:
- text: 指南
link: /zh/guide
Type Definitions
DoomSite
interface DoomSite {
name: string
version: string | number
base: string
}
ExportItem
interface ExportItem {
name?: string
scope: string | string[]
flattenScope?: string[]
onlyInclude?: string[]
exclude?: string[]
}
TranslateOptions
interface TranslateOptions {
systemPrompt?: string
userPrompt?: string
}
LintOptions
interface LintOptions {
cspellOptions?: Partial<Options>
}
AlgoliaOptions
interface AlgoliaOptions {
appId: string
apiKey: string
indexName: string
}
Complete Example
# doom.config.yaml
title: Acme Documentation
lang: en
root: docs
outDir: dist
base: /docs/
prefix: /v2
siteUrl: https://docs.acme.com
themeConfig:
locales:
- lang: en
label: English
sidebar:
/:
- text: Getting Started
items:
- text: Installation
link: /installation
- text: Quick Start
link: /quickstart
- text: Guides
items:
- text: Basics
link: /guides/basics
- text: Advanced
link: /guides/advanced
- lang: zh
label: 中文
sidebar:
/zh:
- text: 开始使用
items:
- text: 安装
link: /zh/installation
- text: 快速开始
link: /zh/quickstart
editRepoBaseUrl: https://github.com/acme/docs/blob/main
algolia:
appId: ABC123
apiKey: xyz789
indexName: acme-docs
translate:
systemPrompt: |
Translate technical documentation for Acme product.
Maintain professional tone.
lint:
cspellOptions:
words:
- Acme
- Kubernetes
- microservices
export:
- name: user-guide
scope:
- getting-started/**
- guides/**
- name: api-reference
scope:
- apis/**
internalRoutes:
- drafts/**
- internal/**
reference:
- repo: acme/shared-docs
branch: main
path: content
target: shared