Commands
Dorcs has three main entry points:
- default server mode
initbuild
dorcs
Starts the docs server.
dorcs [flags]
Flags:
| Flag | Default | Purpose |
|---|---|---|
--dir |
./docs |
Docs directory |
--addr |
:8080 |
Listen address |
--base-url |
"" |
URL prefix such as /docs |
--title |
"" |
Override site title |
--cache |
true |
Currently accepted by the CLI, but not behaviorally significant in the current server implementation |
--no-drafts |
true |
Hide draft pages |
--config |
"" |
Explicit config file |
--repo |
"" |
GitHub repository to bootstrap docs and config from |
--theme |
"" |
Override theme preset |
--theme-mode |
"" |
Override theme mode |
--watch |
false |
Enable file watching and live reload |
Example:
dorcs --dir ./docs --watch --addr 127.0.0.1:8080
dorcs --repo https://github.com/owner/repo/tree/main/docs
dorcs init
Creates a starter docs site.
dorcs init [flags]
Flags:
| Flag | Default | Purpose |
|---|---|---|
--dir |
./docs |
Directory to initialize |
--title |
Documentation |
Starter site title |
--config |
true |
Create a basic config file |
Example:
dorcs init --dir ./handbook --title "Team Handbook"
dorcs build
Builds a static site.
dorcs build [flags]
Flags:
| Flag | Default | Purpose |
|---|---|---|
--dir |
./docs |
Docs directory |
--output |
./dist |
Output directory |
--base-url |
"" |
URL prefix for deployment |
--title |
"" |
Override site title |
--no-drafts |
true |
Hide draft pages |
--config |
"" |
Explicit config file |
--repo |
"" |
GitHub repository to bootstrap docs and config from |
--theme |
"" |
Override theme preset |
--theme-mode |
"" |
Override theme mode |
Example:
dorcs build --output ./dist --base-url /docs
dorcs build --repo owner/repo/tree/main/docs --output ./dist
Notes
- The default server mode also exposes search and sitemap endpoints
--watchis skipped for GitHub-backed docs--configtakes precedence over--repo--repolooks fordorcs.yaml,dorcs.yml, ordorcs.jsonat the repo root first, then at the repo path--base-urlis sanitized to avoid invalid path segments- static builds generate
sitemap.xml, but not a live search API