Configuration
TOC
Configuration File
In most cases, we only need to use a static yaml configuration file, supporting doom.config.yaml or doom.config.yml. For complex scenarios, such as requiring dynamic configuration or custom rspress plugins, js/ts configuration files can be used, supporting multiple file formats including .js/.ts/.mjs/.mts/.cjs/.cts.
For js/ts configuration files, we need to export the configuration, which can be combined with the defineConfig function exported from @alauda/doom/config to provide type assistance:
Basic Configuration
lang: Default documentation language. To accommodate most projects, we support both Chinese and English documents by default. The default language isen. If the current documentation project does not require multilingual support, this can be set tonullorundefined.title: Documentation title, displayed on the browser tab.logo: Logo at the top left of the documentation, supports image URLs or file paths. Absolute paths refer to files under thepublicdirectory, relative paths refer to files relative to the current tool directory. By default, the built-in Alauda logo from thedoompackage is used.logoText: Documentation title, displayed next to the logo at the top left.icon: Documentation favicon, defaults to the same aslogo.base: Base path for the documentation, used when deploying to a non-root path, such asproduct-docs. Defaults to/.outDir: Directory for build outputs, defaults todist/{base}/{version}. If specified, it changes todist/{outDir}/{version}, whereversionis optional. See Multi-version Build for reference.
API Documentation Configuration
Refer to API Documentation for writing documentation.
Permission Documentation Configuration
Refer to Permission Documentation for writing documentation.
Reference Documentation Configuration
frontmatterMode
ignore: Ignore the frontmatter of the referenced document, keep using the current document's frontmatter.merge: Merge the frontmatter of the referenced document. If keys conflict, the referenced document's values override the current document's.replace: Replace the current document's frontmatter with that of the referenced document.remove: Remove the current document's frontmatter.
Refer to Reference Documentation for writing documentation.
Release Notes Configuration
Taking the above template=fixed&project=DevOps as an example, fixed is the template name defined in queryTemplates. The remaining query parameter project=DevOps is passed as ejs template parameters to the fixed template, which after processing is used to form a jira jql request to https://jira.alauda.cn/rest/api/2/search?jql=<jql>. This API requires authentication, and the environment variables JIRA_USERNAME and JIRA_PASSWORD must be provided to preview the effect.
Sidebar Configuration
Internal Documentation Routes Configuration
Only Include Documentation Routes Configuration
Syntax Highlighting Plugin Configuration
Unconfigured languages will trigger warnings in the command line and fall back to rendering as plaintext.
sites.yaml Configuration
The sites.yaml configuration file is used to configure subsite information associated with the current documentation site. This information is used by External Site Components and when building single-version documentation.
Translation Configuration
Editing Documentation in Code Repository
Documentation Export Configuration
Documentation Lint Configuration
Algolia Search Configuration
Please use public/robots.txt for Algolia crawler verification.
Due to the current architecture limitations of rspress, using Algolia search requires implementing via a custom theme. To unify usage of related theme features, we provide the @alauda/doom/theme theme entry. Please add the following theme configuration file to enable: