Global Options
Global options can be used with any Doom command. They configure behavior that applies across commands.Configuration
-c, —config
Specify the path to the config file
doom.config.* files)
Example:
- Multiple configuration files for different environments
- Shared configuration across projects
- Testing configuration changes
Version & Base Path
-v
Specify the version of the documentationSpecial values:
unversioned- No version in pathunversioned-x.y- Version in config but not in path
--v 2.0→dist/docs/2.0/--v unversioned→dist/docs/--v unversioned-1.5→dist/docs/(1.5 stored in config)
-b, —base
Override the base of the documentation
/ (root)
Example:
- URL structure:
https://example.com/docs/page - Asset paths
- Navigation links
- Sitemap generation
-p, —prefix
Specify the prefix of the documentation base
Content Filtering
-I, —include
Include only the specific language(s)
- Build only English docs for faster iteration
- Test single language during development
- Deploy language-specific builds
-E, —exclude
Include all languages except the specific language(s)
- Skip incomplete translations
- Reduce build time by excluding large translations
- Regional deployments
-i, —ignore
Ignore internal routes defined in
internalRoutes config- Hide draft content
- Exclude internal documentation
- Production builds without work-in-progress content
—lang
Specify the language of the documentation
Export & Download
-d, —download
Display download PDF link on nav bar
- Adds download button to navigation
- Links to generated PDF (if available)
- Only shows when PDF exists
-e, —export
Run or build in exporting PDF modeAutomatically ignores
apis/** and */apis/** routes- Excludes API routes
- Optimizes for PDF rendering
- Applies print-specific styles
Output
-o, —out-dir
Override the
outDir defined in config or default dist/{base}/{version}The resulting path will be dist/{outDir}/{version}dist/{base}/{version}
Example:
Redirect Behavior
-r, —redirect
Whether to redirect to the locale closest to
navigator.languageOptions:auto- Always redirect to browser languagenever- Never redirectonly-default-lang- Redirect only from default language
| Value | User visits / | Browser: zh | Browser: en |
|---|---|---|---|
auto | Redirects | → /zh | → /en |
never | No redirect | / | / |
only-default-lang | Redirects if default | Conditional | Conditional |
Edit Repository
-R, —edit-repo
Enable or override the
editRepoBaseUrl config featuretrue- Enable with config URLfalse- Disablestring- Override with URL (GitHub prefix optional)lang-code- Use same repo with language sub-path
Search
-a, —algolia
Enable or use preset for Algolia search
true- Enable with configfalse- Disablealauda- Use Alauda preset (docs.alauda.io)
Sitemap
-S, —site-url
Enable siteUrl for sitemap generation
sitemap.xml in output directory
Force Operations
-f, —force
Force operations:
- Fetch latest reference remotes or scaffolding templates (ignore cache)
- Translate without hash equality check and original text
| Command | Effect |
|---|---|
new | Ignores local template cache |
translate | Retranslates even if source unchanged |
build | Refetches external references |
dev | Refetches external references |
Browser Control
-n, —no-open
Do not open the browser after starting the server
- Headless environments
- CI/CD pipelines
- Multiple simultaneous servers
- Personal preference