Configuration

All configuration lives in ciderpress.config.ts at your repo root. Use defineConfig for type safety and autocompletion.

import { defineConfig } from 'ciderpress'

export default defineConfig({
  title: 'My Docs',
  description: 'Project documentation',
  sections: [{ title: 'Introduction', path: '/intro', include: 'docs/intro/*.md' }],
})

Configuration is loaded via c12. Supported file formats: .ts, .mts, .js, .mjs, .json, .jsonc, .yml, .yaml.

Canonical example

A representative config exercising the most commonly used fields. Every field has its own section below.

import { defineConfig } from 'ciderpress'

export default defineConfig({
  title: 'Acme Docs',
  description: 'Documentation for the Acme platform',
  tagline: 'Ship faster with the Acme SDK',
  icon: 'pixelarticons:book-open',
  loader: 'apple',
  theme: { name: 'base', variant: 'dark' },
  socialLinks: [{ icon: 'github', mode: 'link', content: 'https://github.com/acme' }],
  actions: [
    { theme: 'brand', text: 'Get Started', link: '/getting-started' },
    { theme: 'alt', text: 'View on GitHub', link: 'https://github.com/acme' },
  ],
  apps: [
    {
      title: 'API',
      icon: { id: 'devicon:hono', color: 'blue' },
      description: 'REST API with typed routes',
      tags: ['hono', 'typescript'],
      path: '/apps/api',
      include: 'apps/api/docs/*.md',
    },
  ],
  packages: [
    {
      title: 'SDK',
      icon: { id: 'devicon:typescript', color: 'blue' },
      description: 'Typed client for the Acme API',
      tags: ['typescript'],
      path: '/packages/sdk',
      include: 'packages/sdk/docs/*.md',
    },
  ],
  sections: [
    {
      title: 'Getting Started',
      path: '/getting-started',
      description: 'Install, configure, and ship your first integration.',
      landing: true,
      include: 'docs/getting-started/*.md',
    },
  ],
})

Top-level fields

FieldTypeDefaultDescription
titlestringSite title shown in browser tab and home page
descriptionstringMeta description and home page hero headline
taglinestringHero tagline below the headline on the home page
sectionsSection[](required)Information architecture tree
nav'auto' | NavItem[]'auto'Top navigation bar
themeThemeConfigTheme configuration (name, variant, switcher, color overrides)
themesCiderpressThemeInput[]Custom themes registered alongside the built-ins. See Themes
siteSiteConfigSite chrome — version chip, edit/report links, sidebar promo, topbar CTA, announcement, footer
loader'apple' | 'classic''apple'Inline FOUC loader style
iconIconIdBrand icon (Iconify 'prefix:name') rendered next to the site title in the topbar. No { id, color } form
logostring | LogoFnBrand logo — image path or ({ theme }) => LogoImage | ReactNode
featuresFeature[]Explicit home page feature cards (replaces auto-gen)
actionsHeroAction[]Home page hero call-to-action buttons (max 2)
sidebarSidebarConfigPersistent links above/below the sidebar nav tree
appsWorkspace[]Standalone applications and runnable services. Drives home/landing cards and intro pages
packagesWorkspace[]Reusable modules (libraries, SDKs, configs). Drives home/landing cards and intro pages
workspacesWorkspaceGroup[]Custom named groups of workspace items, rendered after apps and packages
openapiOpenAPIConfigOpenAPI spec integration for interactive API docs
excludestring[]Glob patterns excluded globally across all sources
homeHomeConfigHome page layout (eyebrow, trust strip, CTA band, grid columns)
socialLinksSocialLink[]Social media links displayed in the navigation bar
footerFooterConfigFooter message, copyright text, and social link visibility

apps, packages, and workspaces use the same Workspace shape (see Workspace) — they only differ in label and discovery order on the home page. Pick apps for things that deploy or run, packages for shared modules, and workspaces for arbitrary custom groups.

Section

Each node in sections is a Section. What you provide determines what it is:

Page — single file:

{ title: 'Architecture', path: '/architecture', include: 'docs/architecture.md' }

Page — inline content:

{ title: 'Overview', path: '/overview', content: '# Overview\nProject overview content.' }

Page — async content generator:

{ title: 'Status', path: '/status', content: async () => fetchStatus() }

Section — explicit children:

{
  title: 'Guides',
  items: [
    { title: 'Quick Start', path: '/guides/quick-start', include: 'docs/guides/quick-start.md' },
    { title: 'Deployment', path: '/guides/deployment', include: 'docs/guides/deployment.md' },
  ],
}

Section — auto-discovered from glob with landing:

{
  title: 'Guides',
  path: '/guides',
  description: 'Step-by-step walkthroughs.',
  landing: true,
  include: 'docs/guides/*.md',
}

Section fields

FieldTypeRequiredDescription
titleTitleConfigyesDisplay name or derived title config
descriptionstringnoOne-line description rendered on the auto-generated landing page
pathstringnoOutput URL path
includestring | string[]noSource file path(s) or glob pattern(s)
contentstring | (() => string | Promise<string>)noInline or generated markdown content
itemsSection[]noExplicit child entries
landingbooleannoEnable/disable landing page generation
collapsiblebooleannoMake sidebar section collapsible
excludestring[]noExclude globs scoped to this entry
hiddenbooleannoHide from sidebar (page still routable)
frontmatterFrontmatternoInjected YAML frontmatter
sort'default' | 'alpha' | 'filename' | 'none' | comparatornoSort order for discovered children
recursivebooleannoDirectory-based nesting for recursive globs
entryFilestringnoSection header filename (default: "overview")
iconIconConfignoIcon for cards and landing pages
cardCardConfignoLanding page card metadata
standalonebooleannoSeparate sidebar namespace (requires path)
rootbooleannoMark this section as the active sidebar root — topbar treats it as the active workspace

TitleConfig is either a plain string or { from: 'auto' | 'filename' | 'heading' | 'frontmatter', transform?: (text, slug) => string } for derived titles. Only Section.title accepts TitleConfig — every other title field in this reference is a plain string.

IconConfig is either a plain Iconify identifier string (e.g. 'devicon:hono') or an object { id: string, color: string } for explicit color control. See Icon Colors for available color values.

The sort field accepts:

ValueBehavior
'default'Sections first, then pin intro files (introduction, intro, overview, index, readme), then alphabetical title
'alpha'Alphabetical by title
'filename'Alphabetical by source filename
'none'Preserve glob-discovery order
comparator(a: ResolvedPage, b: ResolvedPage) => number — sort by your own rule. Each ResolvedPage has title, link, and frontmatter

'default' is the implicit fallback when sort is omitted. Sections (entries with children) always sort before leaf pages regardless of pin status.

Workspace

Metadata for a monorepo app, package, or custom workspace. Drives home page cards, landing page cards, and the auto-generated introduction page. The same shape is used by apps, packages, and the items of every WorkspaceGroup.

{
  title: 'API',
  icon: { id: 'devicon:hono', color: 'blue' },
  description: 'REST API with typed routes',
  tags: ['hono', 'typescript'],
  path: '/apps/api',
  include: 'apps/api/docs/*.md',
  sort: 'alpha',
}
FieldTypeRequiredDescription
titlestringyesDisplay name
iconIconConfignoIconify identifier or { id, color } object
descriptionstringyesShort description for cards
tagsstring[]noTechnology tags — case-insensitive, mapped to icons via the tech registry
badge{ src: string; alt: string }noDeploy badge image
pathstringyesURL prefix for this workspace's documentation
includestring | string[]noSource file path(s) or glob pattern(s) for content discovery
sort'default' | 'alpha' | 'filename' | 'none' | comparatornoSort order for discovered content
excludestring[]noGlob patterns excluded from discovery
recursivebooleannoDirectory-based nesting for recursive globs
entryFilestringnoSection header filename (default: "overview")
frontmatterFrontmatternoInjected YAML frontmatter for all discovered pages
itemsSection[]noExplicit child sections
openapiOpenAPIConfignoOpenAPI spec integration for this workspace

WorkspaceGroup

A named group of workspace items, rendered as a card cluster on the home page and as its own auto-generated landing page. Use apps and packages for the common cases — reach for workspaces (an array of WorkspaceGroup) only when you need custom group labels like "Integrations" or "Plugins".

{
  title: 'Integrations',
  description: 'Third-party service connectors',
  icon: 'pixelarticons:integration',
  items: [
    { title: 'Stripe', description: 'Payment processing', path: '/integrations/stripe' },
  ],
}
FieldTypeRequiredDescription
titlestringyesGroup display name
descriptionstringnoShort description
iconIconIdyesIconify identifier — plain 'prefix:name' string only, does not accept { id, color }
itemsWorkspace[]yesWorkspace items in this group (must contain at least one workspace)
linkstringnoURL prefix override (defaults to /${slugify(title)})

CardConfig

Controls how an entry appears as a card on its parent section's auto-generated landing page.

{
  icon: { id: 'devicon:hono', color: 'blue' },
  scope: 'apps/',
  description: 'REST API with typed routes',
  tags: ['Hono', 'REST'],
  badge: { src: '/logos/vercel.svg', alt: 'Vercel' },
}
FieldTypeDescription
iconIconConfigIconify identifier or { id, color } object
scopestringScope label above the card name
descriptionstringShort description (overrides auto-extracted)
tagsstring[]Technology tag badges
badge{ src: string; alt: string }Deploy badge image

Explicit navigation bar configuration. Used when nav is an array instead of 'auto'.

nav: [
  { title: 'Guides', link: '/guides/deploying-to-vercel' },
  { title: 'API', link: '/api/overview' },
]
FieldTypeDescription
titlestringDisplay text
linkstringTarget URL path
itemsNavItem[]Dropdown children
activeMatchstringRegex pattern for active state matching

Set nav: 'auto' to generate one nav item per non-standalone top-level section.

Feature

Explicit feature card for the home page. Replaces the auto-generated cards derived from top-level sections.

features: [
  {
    title: 'Getting Started',
    description: 'Set up ciderpress and create your first site.',
    link: '/getting-started',
    icon: 'pixelarticons:speed-fast',
  },
]
FieldTypeDescription
titlestringCard title
descriptionstringShort description below title
linkstringClick target URL
iconIconConfigIconify identifier or { id, color } object

OpenAPIConfig

Configuration for OpenAPI spec integration.

FieldTypeDefaultDescription
specstring(required)Path to OpenAPI JSON or YAML file, relative to repo root
pathstring(required)URL prefix for API operation pages
titlestring'API Reference'Sidebar group title
sidebarLayout'method-path' | 'title''method-path'How operations appear in the sidebar

sidebarLayout controls how API operations are displayed in the sidebar:

  • 'method-path' — shows GET /users with method badge and path in code font
  • 'title' — shows the operation summary (e.g., "List Users")

HeroAction

A call-to-action button on the home page hero section.

actions: [
  { theme: 'brand', text: 'Get Started', link: '/getting-started/quick-start' },
  { theme: 'alt', text: 'View on GitHub', link: 'https://github.com/...' },
]
FieldTypeDescription
theme'brand' | 'alt'Button style variant
textstringButton label
linkstringClick target URL

SidebarConfig

Persistent links rendered above or below the sidebar navigation tree.

sidebar: {
  above: [
    { text: 'Home', link: '/', icon: 'pixelarticons:home' },
  ],
  below: [
    { text: 'GitHub', link: 'https://github.com/...', icon: 'pixelarticons:github' },
  ],
}
FieldTypeDescription
aboveSidebarLink[]Links rendered above the nav tree
belowSidebarLink[]Links rendered below the nav tree

Each SidebarLink has:

FieldTypeRequiredDescription
textstringyesLink display text
linkstringyesTarget URL
iconIconConfignoIconify icon identifier
style'brand' | 'alt' | 'ghost'noVisual style variant
shape'square' | 'rounded' | 'circle'noIcon shape

HomeConfig

Home page layout — hero eyebrow, trust strip, final CTA band, and card-grid layout for features and workspaces.

home: {
  eyebrow: 'open source · v1.0 · MIT',
  features: { columns: 3, truncate: { description: 2 } },
  workspaces: { columns: 2, truncate: { title: 1, description: 2 } },
  trust: {
    lead: 'used by docs at',
    names: ['Acme', 'Globex', 'Initech'],
  },
  cta: {
    title: 'Ship the docs your team deserves.',
    subtitle: 'One CLI. Three minutes. Production-ready.',
    actions: [
      { theme: 'brand', text: 'Get started', link: '/getting-started/quick-start' },
      { theme: 'alt', text: 'Star on GitHub', link: 'https://github.com/acme/docs' },
    ],
  },
}
FieldTypeDescription
eyebrowstringEyebrow chip rendered above the hero title (e.g. version label)
featuresHomeGridConfigLayout options for feature cards
workspacesHomeGridConfigLayout options for workspace cards
trustHomeTrustConfigTrust strip rendered between the hero and the features grid
ctaHomeCtaConfigFinal CTA band rendered just above the footer

Each HomeGridConfig has:

FieldTypeDescription
columns1 | 2 | 3 | 4Number of grid columns
truncateTruncateConfigMax visible lines before clipping with ellipsis

TruncateConfig accepts title?: number and description?: number for line-clamp values.

HomeTrustConfig:

FieldTypeDescription
leadstringShort lead phrase (e.g. "used by docs at")
namesstring[]List of names to render (renders nothing when empty)

HomeCtaConfig:

FieldTypeDescription
titlestringCTA headline
subtitlestringOptional supporting text
actionsHeroAction[]Up to two CTA buttons (max 2; same shape as top-level actions)

SiteConfig

Site-level chrome — version chip, edit/report links, sidebar promo, topbar CTA, announcement banner, and extended footer. Every field is optional; pieces with no config render nothing.

site: {
  version: 'v1.0',
  edit:   { repo: 'acme/docs', branch: 'main', directory: 'docs' },
  report: { repo: 'acme/docs' },
  sidebarPromo: {
    title: 'Try Acme Cloud',
    body:  'Hosted Acme in two clicks.',
    cta:   { text: 'Start free', href: 'https://acme.io' },
  },
  topbarCta: { text: 'Get started', href: '/getting-started' },
  announcement: {
    id: 'v1',
    lead: 'NEW',
    message: 'Acme Docs 1.0 is here.',
    cta: { href: '/changelog', label: 'What changed' },
  },
  footer: {
    columns: [
      { heading: 'Product', links: [{ text: 'Features', href: '/features' }] },
      { heading: 'Community', links: [{ text: 'GitHub', href: 'https://github.com/acme' }] },
    ],
    tagline: 'Built with ciderpress',
  },
}
FieldTypeDescription
versionstringVersion label next to the brand in the topbar (e.g. 'v1.0'). Omit to hide
editSiteEditConfig"Edit this page on GitHub" link rendered under every doc page
reportSiteReportConfig"Report an issue" link rendered under every doc page
sidebarPromoSiteSidebarPromoConfigPromo card pinned to the bottom of the docs sidebar
topbarCtaSiteCtaConfigTopbar CTA button (also mirrored into the mobile nav)
announcementAnnouncementConfigAnnouncement banner rendered above the topbar
footerSiteFooterConfigFooter columns, tagline, and brand mark

SiteEditConfig:

FieldTypeDescription
repostring"org/repo" shorthand or full URL
branchstringBranch to link against (default "main")
directorystringSubdirectory inside the repo containing the docs (default: repo root)
labelstringOverride the visible label (default "Edit this page on GitHub")

SiteReportConfig:

FieldTypeDescription
repostring"org/repo" shorthand or full issues URL
labelstringOverride the visible label (default "Report an issue")

SiteSidebarPromoConfig:

FieldTypeDescription
titlestringPromo headline
bodystringBody copy
cta{ text: string; href: string }CTA button

SiteCtaConfig:

FieldTypeDescription
textstringButton label
hrefstringClick target

AnnouncementConfig:

FieldTypeDescription
idstringStable id — when present, dismissal persists in localStorage
leadstringHighlighted lead phrase rendered before the message (e.g. "NEW")
messagestringBody text of the announcement
cta{ href: string; label: string }Optional CTA appended after the message
persistentbooleanWhen true, hides the dismiss button

SiteFooterConfig:

FieldTypeDescription
columnsSiteFooterColumn[]Link columns rendered in the footer grid. Omit for a minimal footer
taglinestringSmall tagline rendered on the right side of the bottom strip
brandMarkstringBrand mark character rendered in the footer's brand block (default 'Z')

SiteFooterColumn:

FieldTypeDescription
headingstringColumn heading
links{ text: string; href: string }[]Column links

Security note — all href values inside site.* are validated through a safe-URL helper that rejects javascript:, data:, vbscript:, and file: schemes. Relative paths, fragment anchors, http://, https://, mailto:, and tel: are allowed.

Social media links displayed in the navigation bar.

socialLinks: [
  { icon: 'github', mode: 'link', content: 'https://github.com/acme' },
  { icon: 'discord', mode: 'link', content: 'https://discord.gg/acme' },
]
FieldTypeRequiredDescription
iconSocialLinkIcon | { svg: string }yesBuilt-in icon name or custom SVG
mode'link' | 'text' | 'img' | 'dom'yesHow the content is rendered
contentstringyesURL, text, image source, or HTML depending on mode

Built-in SocialLinkIcon values (the canonical list — see SOCIAL_LINK_ICONS in @ciderpress/config):

import type { SocialLinkIcon } from '@ciderpress/config'

// 'lark' | 'discord' | 'facebook' | 'github' | 'instagram' | 'linkedin'
// | 'slack' | 'x' | 'youtube' | 'wechat' | 'qq' | 'juejin' | 'zhihu'
// | 'bilibili' | 'weibo' | 'gitlab' | 'X' | 'bluesky' | 'npm'

Capital X is a separate accepted alias for x. Any icon outside this set must be supplied as { svg: '<svg>...</svg>' }.

FooterConfig

Footer displayed below all page content.

footer: {
  message: 'Built with ciderpress',
  copyright: 'Copyright © 2025 Acme Inc.',
  socials: true,
}
FieldTypeDescription
messagestringFooter message text
copyrightstringCopyright notice
socialsbooleanShow social links from socialLinks in the footer

References

  • Frontmatter — per-page metadata schema
  • CLI Commands — flags and behavior for every command
  • Icon Colors — color values accepted by IconConfig
  • Themes — registering custom themes via themes
  • Workspaces — when to use apps, packages, or workspaces

Resources

  • c12 — the config loader used under the hood