In most cases, a static yaml
configuration file is sufficient. It supports doom.config.yaml
or doom.config.yml
. For more complex scenarios, such as requiring dynamic configurations or customizing rspress
plugins, js/ts
configuration files can be used, supporting various formats like .js/.ts/.mjs/.mts/.cjs/.cts
.
For js/ts
configuration files, we need to export the configuration, which can be achieved using the defineConfig
function exported from @alauda/doom/config
for type assistance:
lang
: The default document language. To accommodate most projects, we support both Chinese and English documents by default, with the default language set to en
. If the current document project does not require multilingual support, this can be set to null
or undefined
.title
: The document title, which will appear in the browser tab.logo
: The logo in the top left corner of the document. It supports image links and file paths; absolute paths reference files in the public
directory, while relative paths refer to files relative to the current tool directory. By default, it uses the built-in Alauda logo from the doom
package.logoText
: The document title that will display at the logo location in the top left corner.icon
: The document favicon, which defaults to the same as logo
.base
: The base path for the document, used for deployment to non-root paths, such as product-docs
, defaults to /
.outDir
: The output directory for build artifacts, defaulting to dist/{base}/{version}
. If specified, it changes to dist/{outDir}/{version}
where version
is optional. Refer to multi-version builds.For writing documentation, refer to API documentation.
For writing documentation, refer to permissions documentation.
frontmatterMode
ignore
: Ignores the frontmatter of the referenced document, keeping the current document's frontmatter.merge
: Merges the frontmatter of the referenced document. If there are the same keys, the values from the referenced document will overwrite the current document's values.replace
: Replaces the current document's frontmatter with that of the referenced document.remove
: Removes the current document's frontmatter.For writing documentation, refer to reference documentation.
Taking the above template=fixed&project=DevOps
as an example, fixed
is the template name defined in queryTemplates
, and the remaining query
parameter project=DevOps
will be passed as parameters to the ejs template to process the fixed
template which in turn initiates a Jira jql
request at https://jira.alauda.cn/rest/api/2/search?jql=<jql>
. This API requires authentication and needs environment variables JIRA_USERNAME
and JIRA_PASSWORD
to preview the results.
Languages that are not configured will prompt a warning on the command line and will fall back to plaintext
rendering.
sites.yaml
ConfigurationThe sites.yaml
configuration file is used to configure the sub-site information associated with the current documentation site. This defined information will be used when referring to external site components and building single-version documents.