doc
The rs doc command uses Rspress to develop, build, and preview a documentation site.
Install @rspress/core before using the command:
Usage
The command loads the documentation configuration registered with define.doc(). When no subcommand is provided, it starts the Rspress development server. The optional root argument overrides the configured documentation root directory.
Options
rs doc supports the same options as the corresponding Rspress commands. See the Rspress CLI documentation for details.
Examples:
Subcommands
build
rs doc build builds the documentation site for production.
preview
rs doc preview previews the output generated by rs doc build locally.
eject
rs doc eject copies a built-in Rspress theme component into the project for customization. Run it without a component name to list all ejectable components.
Configuration
Configure the documentation site through define.doc() in the Rstack configuration file. It accepts the standard Rspress configuration: