Configuration
All configuration lives in ciderpress.config.ts at your repo root. Use defineConfig for type safety and autocompletion.
Configuration is loaded via c12. Supported file formats: .ts, .mts, .js, .mjs, .json, .jsonc, .yml, .yaml.
pages is the only required field. Every other top-level key is optional — minimal config produces a clean site with zero framework branding.
Rich text
Display strings on the home page accept inline markup — no flag, no opt-in. Ciderpress parses it and drops anything unsafe.
This covers the hero, every home.blocks[] band (proof, features, showcase, split, tabs, cta), and workspace cards. Strings outside those surfaces — footer, sidebar.promo, sidebar link text, and announcement — render verbatim today, so markers in them show as literal characters.
** is the accent: a heading is already bold, so weight by itself would say nothing there — ** colours the phrase instead, in headings and body copy alike. Reach for <strong> on the rare occasion you want bold without the colour. == keeps the meaning it has in Obsidian, Typora, and markdown-it-mark — a highlight.
Because inline HTML is supported, <span class="cp-accent">text</span> and <mark>text</mark> are equivalent long forms of the two markers. Useful when you want the accent on part of a word, or inside copy that already uses asterisks.
Inline HTML is allowed for a, b, strong, i, em, code, kbd, mark, sup, sub, span, small, u, s, del, and ins, keeping only the class (or classname), title, and (on <a>) href attributes. An <a href> is validated exactly like a markdown link.
Escaping
A backslash makes any marker literal — \*, \`, \=, \[, \], \<, and \\. Needed when copy has to name a glob or an expression:
An asterisk is only read as italic when it hugs its text, so 2 * 3 and a bare *.md already pass through untouched; reach for the backslash when a marker sits directly against a word.
What gets dropped
Parsing produces React elements directly — markup is never injected as raw HTML, so nothing in a config string can execute.
<script>,<style>,<iframe>,<object>,<embed>,<template>,<noscript>— removed with their contents- Any other unrecognised tag — unwrapped, its text kept (
<div>hi</div>rendershi) - Every attribute outside the whitelist, including
onclickandstyle - Links whose scheme fails validation (
javascript:,data:) — the label stays, the anchor goes
Block markdown — lists, headings, blockquotes, tables — is not supported. These fields are single-line display copy; use a markdown page for prose.
Plain-text contexts
The same string is stripped to bare text wherever markup cannot render: the document <title>, <meta name="description">, and the tab strip's aria-label. One value serves both.
Hero title accent
The hero headline accents its trailing half automatically. Bold anything in the title and that guess steps aside — you get exactly what you marked:
Escape hatch
For layout beyond inline markup, override the theme components rather than reaching for HTML in config: HomeLayout accepts beforeHero / afterHero slots, and Hero, HomeSplit, HomeTabs, CTA, PageRail, RichText, and renderRichText are all exported from @ciderpress/ui.
Site identity
Top-level scalar fields that identify the site itself.
seo
Set the production origin once; Ciderpress derives canonical URLs, absolute social metadata,
and sitemap.xml from it. Rspress continues to provide the page title, description, and base
Open Graph tags.
Rspress also generates llms.txt, llms-full.txt, and per-page Markdown automatically. These
are root-level discovery files and do not require an HTML <head> tag.
redirects
Redirect moved documentation routes after the Ciderpress app loads:
Rules run in order, and each from value is compiled as a regular expression. Anchor a path with
^ and $ when it should match exactly.
These are client-side redirects. The app loads before the browser replaces its URL, and the server
does not return a real 301 or 308. This is usually sufficient for internal documentation. For
public documentation, prefer redirects configured in the hosting platform: they run before page
load, avoid a visible flash, and preserve search-engine signals.
The host must serve Ciderpress's generated 404.html for unmatched routes. Netlify, Vercel, and
GitHub Pages do this by default. If a host does not, configure its fallback route to 404.html.
brand
Brand chrome — icon, wordmark, hero background, favicon, and the inline FOUC loader. Defaults to invisible: omit any field to render nothing in that slot.
BannerFn
The function receives the active theme context and returns either an image source or a React node. Use the React-node variant for procedural canvas, WebGL, or inline SVG backgrounds that respond to theme tokens.
Put component JSX in a .tsx module, import it from ciderpress.config.ts, and return createElement(HeroCanvas, props). Components run in the browser, so keep module initialization browser-safe and access DOM APIs from effects.
home.hero.background takes precedence when set. Otherwise, a plain-string banner is serialized as an image background and a function banner renders at runtime.
LoaderConfig
label is read by screen readers. minDisplayMs and maxDisplayMs clamp visible duration so the loader doesn't flash or hang.
theme
Theming uses a single array of theme entries. The first entry is the default unless one is explicitly marked. Both the named-theme picker and the light/dark variant toggle are independent — themeSwitcher and variantSwitcher.
ThemeEntry
Built-in names and full custom theme definitions share the same array. Either form accepts a default: true marker to override the "first entry wins" rule.
pages
The information architecture tree. Required. Each entry is a Page — the same shape used for leaf documents, sidebar groups, and glob-discovered sections.
Renamed from sections (Page replaces the old Section interface). Children live on Page.pages (renamed from items).
Page
Identity
Source — declare exactly one
nav.* — navigation behavior
Grouped together so per-page chrome flags don't sprawl across the top level of Page.
Landing + card
CardConfig
Card content resolves from this priority order (highest first): card.description → source file frontmatter description → Page.description.
defaults — default page metadata
Renamed from frontmatter. Same Frontmatter type — values here are merged into every child page's frontmatter; per-file YAML wins on conflict.
discover.* — glob-discovery options
Only applies when include is a glob. Renamed from the flat Section.{sort,recursive,exclude,entryFile} fields.
openapi
Per-page OpenAPI spec integration. Generates API operation pages under the page's path. See OpenAPISpec for the shape.
Examples
Leaf page from a single file:
Group with explicit children:
Glob-discovered section with discovery options:
apps, packages, workspaces
Top-level workspace surfaces. Kept flat — apps and packages are the common cases; workspaces is for arbitrary custom groups like "Integrations" or "Plugins".
All three drive the home page card grid (via a showcase block in home.blocks), the auto-generated landing card on their parent, and the workspace introduction page.
Workspace
WorkspaceGroup
OpenAPISpec
Per-page or per-workspace OpenAPI integration. The same shape lives on Page.openapi and Workspace.openapi — declare it once at the mount point you want the API operation pages to live under.
When declared on a Workspace, path must be nested under the workspace's own path — that's checked at validate time. See the OpenAPI reference for a full walkthrough.
socials
Root-level array of social links. Single source of truth — both topbar.socials and footer.socials reference this list via true.
SocialLink
The Rspress mode/content discriminator is no longer exposed — every link is a URL link.
Built-in SocialLinkIcon values:
Any icon outside this set must be supplied as { svg: '<svg>...</svg>' }.
Boolean reference pattern
topbar.socials and footer.socials accept either true (reuse root socials) or SocialLink[] (override with a specific list for that surface).
topbar
Top navigation bar — nav items, primary CTA, social row, announcement banner.
nav: 'auto' rule
Auto-nav emits one top-level entry per root
pagesentry that has apath. Children are not flattened into dropdowns. Roots withnav.hidden: trueare skipped. Workspaces declared via top-levelapps/packages/workspacesare not included — they show on the home grid only. For dropdowns or workspace items in the topbar, use the explicitNavItem[]form.
NavItem
AnnouncementConfig
sidebar
Persistent sidebar chrome — links pinned above and below the nav tree, plus the optional promo card.
SidebarLink
Sidebar links use ButtonConfig directly — no separate type. The same text/href/variant/shape/icon vocabulary as every other button surface.
SidebarPromo
badges
Badge configuration — glob rules that apply a badge (or a named status) by route, plus the group flag for collapsible-doc groups. Badges render on the sidebar, breadcrumb, and section cards. A page's own frontmatter or defaults badge/status wins over a rule. See the Badges reference for the full model.
BadgeRule
Declare at least one of badge or status. match supports *, **, and ?.
statuses
The named status registry — the semantic layer over badges. A status is a reusable, documented preset referenced by id from a page's status field. Entries merge over the built-in defaults by id (matching ids override, new ids extend).
footer
Unified footer config — the old top-level footer and site.footer are now one block.
Smart copyright
copyright: true produces Copyright © <currentYear> <title>. using the top-level title and the year at build time. Pass a string to override verbatim, or a CopyrightConfig for structured company / DBA / year-range output.
CopyrightConfig
FooterColumn
Security note — every
hrefinfooter.*,sidebar.*, andtopbar.*is validated through a safe-URL helper that rejectsjavascript:,data:,vbscript:, andfile:schemes. Relative paths, fragment anchors,http://,https://,mailto:, andtel:are allowed.
editLink and reportLink
Per-page chrome — the "Edit on GitHub" and "Report an issue" links rendered under every doc page. Flattened to the top level to match the industry pattern (VitePress, Nextra). Set either to false to disable that action site-wide.
EditLinkConfig
ReportLinkConfig
Identical shape to EditLinkConfig. repo may be either "org/repo" shorthand or a full issues URL; default label is "Report an issue".
feedback
Controls the "Was this page helpful?" yes/no widget rendered at the bottom of every doc page. Off by default.
home
Home page composition — a special-cased hero header plus an ordered array of blocks. Array order is render order, and any block type may appear more than once (multiple splits, multiple tab bands, etc.). Omit blocks to get the framework default deck: an auto-generated features grid plus a workspace showcase derived from the repo.
blocks: [] renders nothing below the hero. Omitting blocks renders the default deck — a features grid plus the workspace showcase. To keep that deck and add to it, write it out and append:
HomeBlock
A discriminated union on type. Every variant carries its own flat fields — there are no nested section configs.
Every copy-bearing block shares the same flat heading trio — label (small uppercase kicker), title, and body.
HomeHeroConfig
Omit demo entirely to keep the framework's built-in terminal animation.
HomeHeroBackground
Set mode for artwork designed for one color mode. Omit it for artwork that adapts to both site variants.
Use { dark, light } to switch the image and foreground contrast with the active site variant. Each variant accepts the same src, sources, position, size, and repeat fields.
HomeVisual
One union backs every visual on the page — hero.demo, split.visual, and each tab's visual. It is discriminated on type, which is required on all three variants.
Terminal lines[].kind picks the prefix glyph: ok → ✓, info → ▸, cmt → ↻, err → ✗.
HomeProofBlock
ProofLogo
An entry may be a bare string or a logo object. Mix both in one strip.
mono reads only the asset's alpha channel, so trim the artwork's viewBox to the mark itself — surrounding padding becomes part of the silhouette.
Use { dark, light } when a full-colour mark needs separate artwork for contrast. A string keeps the same asset in both variants.
HomeFeaturesBlock
Each Feature:
HomeShowcaseBlock
Generalized card grid. The default source is the combined apps + packages + workspaces list; point it at page paths for an arbitrary card set.
A source path that matches no page or workspace is skipped with a sync warning; if none of them resolve, the band renders nothing rather than falling back to the workspace deck.
HomeSplitBlock
Two-column show-and-tell band — copy on one side, a HomeVisual on the other. Repeatable in any position.
The narrow single-column stack always leads with the copy, so a reversed band never pushes its visual above the headline.
HomeTabsBlock
A strip of selectable tabs driving one panel. Clicking a tab swaps the panel's copy and visual; the first tab is selected on load. Keyboard navigation (arrow keys, Home/End) and the tab/tabpanel ARIA wiring are built in.
Each HomeTabItem:
Narrow breakpoints collapse both orientations to a single stacked column.
HomeCtaBlock
TruncateConfig
Shared by features and showcase blocks. Values are maximum visible lines before CSS line-clamp clips with an ellipsis.
discover
Top-level cross-cutting discovery options. Only field is ignore — global glob patterns excluded from every page's auto-discovery.
Per-page discover.ignore is appended to this list — globals always apply.
templates
Directory or directories holding custom document templates used by ciderpress draft. Each is a .md/.mdx file with label/hint frontmatter; the filename is the template type. Paths are relative to the repo root.
A custom template whose filename matches a built-in (e.g. guide.md) overrides it. .mdx templates scaffold to .mdx files. Templates are validated by ciderpress templates check and as part of check/build. See Templates for the authoring format and the SDK.
devServer
Dev-server configuration — controls how ciderpress dev binds and how the dev URL is presented in the terminal and browser auto-open. All fields are optional.
CLI precedence: --port / --host / --url > devServer.{port,host,url} > built-in defaults.
Example — behind portless.sh
The dev server still binds localhost:6174; portless reverse-proxies the HTTPS hostname to that port. See the portless guide for setup.
Example — exposing to LAN / Docker
Shared primitives
Types reused across multiple top-level keys. Same shape, same meaning, everywhere.
IconConfig
Uniform across every position — brand.icon, Page.icon, Workspace.icon, WorkspaceGroup.icon, Feature.icon, ButtonConfig.icon. Either a plain Iconify identifier ('pixelarticons:book-open'), an Iconify id with explicit color, or an arbitrary image source.
TitleConfig
Uniform across every title field that supports derivation — Page.title and Workspace.title. Plain string for static titles, or a derivation rule for auto-discovered children. The transform hook receives the derived title and the filename slug. (WorkspaceGroup.title is a plain string only.)
ButtonConfig
Unified button vocabulary. Replaces the three old button shapes (HeroAction.theme, SidebarLink.style, and the third unnamed variant). Used by home.hero.actions, the actions / cta fields on home.blocks[], topbar.cta, sidebar.top / sidebar.bottom / sidebar.promo.cta.
ImageSource
Universal image source — string path or a fully described image object. Used by brand.favicon, brand.banner (string form), Workspace.badge, and anywhere else an image is rendered.
SortStrategy
Used by Page.discover.sort and Workspace.discover.sort.
'default' is the implicit fallback when discover.sort is omitted.
Frontmatter
Page.defaults (and Workspace.defaults) take a Frontmatter value. It carries the page
metadata fields Rspress understands plus Ciderpress's nested seo overrides.
Per-file YAML frontmatter wins on conflict with defaults. See Frontmatter Fields for the full field schema.
References
- Frontmatter — per-page metadata schema
- Icon Colors — color values accepted by
IconConfig - Content — how
pagesmap your existing markdown into the site tree - Workspaces — when to use
apps,packages, orworkspaces - Themes — built-in theme names and custom theme definitions