In most cases, a static yaml
configuration file is sufficient. Both doom.config.yaml
and doom.config.yml
are supported. For more 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, exporting the configuration is necessary. You can use the defineConfig
function exported from @alauda/doom/config
to enable type assistance:
lang
: Default document language. To accommodate most projects, we support both Chinese and English documents by default. The default language is en
. If multilingual support is not needed for the current documentation project, this can be set to null
or undefined
.title
: Document title, displayed on the browser tab.logo
: Logo at the top-left of the document. Supports image URLs or file paths. Absolute paths refer to files under the public
directory; relative paths refer to files relative to the current tool directory. Defaults to the Alauda logo built into the doom
package.logoText
: Document title displayed next to the logo at the top-left.icon
: Document favicon, defaults to the same as logo
.base
: Base path of the document, used when deploying to a non-root path, e.g., product-docs
. Defaults to /
.outDir
: Output directory for build artifacts. Defaults to dist/{base}/{version}
. If specified, changes to dist/{outDir}/{version}
, where version
is optional. See Multi-version Build for reference.Refer to API Documentation for writing documentation.
Refer to Permission Documentation for writing documentation.
frontmatterMode
ignore
: Ignore the frontmatter of the referenced document, retain 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.
Taking 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
query to send a request to https://jira.alauda.cn/rest/api/2/search?jql=<jql>
. This API requires authentication; environment variables JIRA_USERNAME
and JIRA_PASSWORD
must be provided for preview to work.
Unconfigured languages will trigger warnings in the command line and fallback to plaintext
rendering.
sites.yaml
ConfigurationThe 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.
Please use public/robots.txt
for Algolia crawler verification.
Due to current architectural limitations of rspress
, Algolia search functionality must be implemented through custom themes. To unify the use of related theme features, we provide the @alauda/doom/theme
theme entry. Please add the following theme configuration file to enable: