You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The command loads the documentation configuration registered with [`define.doc()`](../configuration#define-doc). When no subcommand is provided, it starts the [Rspress development server](https://rspress.rs/api/commands#rspress-dev). The optional `root` argument overrides the configured documentation root directory.
18
+
19
+
## Options
20
+
21
+
`rs doc` supports the same options as the corresponding Rspress commands. See the [Rspress CLI documentation](https://rspress.rs/api/commands) for details.
22
+
23
+
Examples:
24
+
25
+
```bash
26
+
# Start the development server
27
+
rs doc
28
+
29
+
# Use a custom documentation root directory
30
+
rs doc ./documentation
31
+
32
+
# Start the development server on port 8080
33
+
rs doc --port 8080
34
+
```
35
+
36
+
## Subcommands
37
+
38
+
### build
39
+
40
+
[`rs doc build`](https://rspress.rs/api/commands#rspress-build) builds the documentation site for production.
41
+
42
+
```bash
43
+
rs doc build
44
+
```
45
+
46
+
### preview
47
+
48
+
[`rs doc preview`](https://rspress.rs/api/commands#rspress-preview) previews the output generated by `rs doc build` locally.
49
+
50
+
```bash
51
+
rs doc build
52
+
rs doc preview
53
+
```
54
+
55
+
### eject
56
+
57
+
[`rs doc eject`](https://rspress.rs/api/commands#rspress-eject) copies a built-in Rspress theme component into the project for customization. Run it without a component name to list all ejectable components.
58
+
59
+
```bash
60
+
rs doc eject
61
+
```
4
62
5
63
## Configuration
6
64
7
-
See [`define.doc()`](../configuration#define-doc).
65
+
Configure the documentation site through [`define.doc()`](../configuration#define-doc) in the [Rstack configuration file](/guide/configuration#configuration-file). It accepts the standard [Rspress configuration](https://rspress.rs/api/config/config-basic):
0 commit comments