v1.0.0

Config API

Updated 01 Dec 2026Edit this page

Every key accepted by the site chrome data files in src/data/, its type, default and effect.

header.json

logoSourcestringrequired

Path to the header logo, an SVG or PNG. Used in both color modes unless logoAlternateSource is set.

logoAlternateSourcestring

Path to the logo shown in dark mode.

logoAltstring

Alt text for the logo, usually the site name.

showVersionNumberboolean

Badge beside the brand showing the latest changelog version. Hidden when off or when the changelog has no releases.

topbarLinks{ name, path }[]

Links in the header, to the right of the brand. Hidden below 640px.

searchbooleandefault true

Shows the search control and binds ⌘K.

searchPlaceholderstring

Placeholder inside the overlay's input.

themeTogglebooleandefault true

Shows the light/dark control in the header. The scheme is still resolved without it.

sidebar.json

homeLabelstringdefault "Overview"

Label for the standalone link above the first sidebar group.

navGroups{ name, collapsed }[]

Sidebar group order. A group used in frontmatter but absent here is appended alphabetically.

pageTools.json

repositoryUrlstring

The site's source repository. src/utils/repository.ts derives the per-page "Edit this page" link from it; a /tree/<branch> suffix names the branch edit links target, defaulting to main. Empty hides the link.

editPageLabelstringdefault "Edit this page"

Text of the edit link.

feedback.enabledbooleandefault true

Shows the helpful vote at the foot of every documentation page.

feedback.actionstringdefault ""

Where the vote is posted. Empty posts to the page the reader voted on. With CloudCannon Forms, any page on this site also works, such as a thank-you page that readers reach only with JavaScript off. For another service, use its endpoint URL — see Feedback & forms.

feedback.inboxKeystringdefault "stratus-form"

The CloudCannon Inbox that receives the votes, sent as a hidden inbox_key field. Every form on this site uses stratus-form. Delete it when action points at another service.

feedback.promptstringdefault "Was this page helpful?"

The question beside the vote buttons.

feedback.successMessagestring

Shown once a reader has voted.

copyPage.enabledbooleandefault true

Shows the Copy page menu beside each documentation page's title. A page can opt out with showCopyPage: false in its frontmatter.

copyPage.labelstringdefault "Copy page"

Text on the menu's trigger.

theme.json

The accent and brand colors live here too — see Theming.

defaultTheme"dark" | "light" | "system"default "dark"

The color scheme before a reader chooses one. system follows their operating system; the other two don't. See Theming.

themeSelectorbooleandefault true

Shows a swatch button in the corner of CloudCannon's Visual Editor that opens these theme settings. Visitors to the published site never see it.

theme.accentLightstring

The interactive color in light mode — links, the active sidebar item, focus rings and code annotations.

theme.accentDarkstring

The same role in dark mode. Use a paler step than the light one.

theme.brandLightstring

Primary button and brand fill in light mode.

theme.brandDarkstring

Primary button and brand fill in dark mode.

theme.radiusnumber

Corner rounding in pixels, driving every radius on the site. 0 is square.

seo.json

siteNamestringrequired

The site's name in structured data, and the brand name when a page sets none.

urlstringrequired

The production URL, used for canonical links and structured data. Keep it equal to site in astro.config.mjs — npm run check warns while either is still https://example.com.

descriptionstring

The meta description for any page without its own.

titleFormatstring

The browser title. {title} is replaced with the page's title: {title} | Acme gives "Installation | Acme".

logoSourcestring

The social share image for pages that set no image. Empty means link previews show no picture.

faviconSourcestringdefault "/favicon.svg"

The browser tab icon, as an SVG.

faviconIcoSourcestringdefault "/favicon.ico"

The fallback tab icon for browsers without SVG favicon support.

twitterSitestring

The site's X (Twitter) handle, including the @. Optional.

footer.json

links{ name, path }[]

Text links in the footer.

socials{ icon, link }[]

Icon links. icon is an id from src/icons/, such as social/github.

footerTextstring

The line of small print — a copyright notice or license.

announcementBar.json

enabledboolean

Shows the bar at the top of every page.

textstring

The message, in Markdown, so it can carry a link. A reader who dismisses the bar doesn't see it again until the text changes.

homeLabelstringdefault "Docs"

Label for the first crumb, which links to the site root.

redirects.json

routes{ from, to, status }[]

Old URLs and where they go now. from is a path on this site; to is a path or a full URL; status is "301" (permanent) or "302" (temporary). Add one whenever a page is renamed or moved, so shared links keep working.

Redirects only work on CloudCannon hosting

npm run build turns these into CloudCannon's routing file, so they take effect on the next build of a CloudCannon-hosted site. Another host ignores them — recreate them in that host's own redirect config.

Reading config in a component

Each file in src/data/ is a plain JSON import, so any component can read it directly — there is no config loader to learn.

---
import header from "@data/header.json";
---

<nav>
  {header.topbarLinks.map((link) => <a href={link.path}>{link.name}</a>)}
</nav>