Config
The single source of truth for the entire documentation site.
Overview
The config file (ciderpress.config.ts) defines the information architecture -- content structure, navigation, metadata, and workspaces. It is loaded via c12 and validated at runtime by loadConfig(). Validation errors are returned as Result tuples; the CLI layer handles reporting and exits.
Supported Formats
Shape
Output Structure
The sync engine writes everything to .ciderpress/:
Rspress's root is set to .ciderpress/content/. It never sees the original repo layout.
Rspress Integration
createRspressConfig() in @ciderpress/ui bridges sync output to Rspress:
- Sets Rspress
rootto.ciderpress/content/. - Sidebar and nav are loaded by Rspress from
_meta.json(one per content directory) and_nav.json(at the content root). Written bypackages/cli/src/lib/sync/sidebar/write-meta.ts. - The UI package loads
.generated/workspaces.json(workspace card metadata) and.generated/scopes.json(standalone scope paths) at runtime. Seepackages/ui/src/config.ts:89-98. .generated/sidebar.jsonand.generated/nav.jsonare debug snapshots only — written for tooling but not consumed by Rspress.- Registers
ciderpressPlugin(), which adds three global UI components:theme-provider,edit-source-button, andnav-logo(seepackages/ui/src/plugin.ts:17-28). Mermaid (mermaidPlugin) and file trees (fileTree) are separate Rspress plugins added alongsideciderpressPlugin()inpackages/ui/src/config.ts:172-178, not bundled inside it. - Configures Rsbuild aliases so generated MDX can import
@ciderpress/ui/themecomponents.