# Configuration

Site-wide settings live in a few small data files, editable in CloudCannon without touching code.

Source: https://bugstars-docs.pages.dev/configuration/

---

## The config files

Each part of the site chrome has its own file in `src/data/`. They are CloudCannon data files, so an editor changes them in the app rather than in a pull request.

| File | Controls |
| --- | --- |
| `header.json` | Logo, version badge, top links, search and the theme toggle |
| `sidebar.json` | The sidebar's lead link and group order |
| `pageTools.json` | The "Edit this page" link, the Copy page menu and the feedback block |
| `theme.json` | The default color scheme, accent and brand colors |
| `seo.json` | Site name, production URL, title format, favicons and share image |
| `footer.json` | Footer links, social icons and small print |
| `announcementBar.json` | The dismissible message at the top of every page |
| `breadcrumbs.json` | The label of the first breadcrumb |
| `redirects.json` | Old URLs and where they go now (CloudCannon hosting only) |

Every key in every file is listed in the [Config API](/config-api/).

<CodeTabs showCopy={true}>
<CodeTab label="header.json" language="json">

```
{
  "logoSource": "/src/assets/images/logo/logo-light.svg",
  "logoAlternateSource": "/src/assets/images/logo/logo-dark.svg",
  "logoAlt": "Stratus",
  "showVersionNumber": true,
  "search": true,
  "themeToggle": true
}
```

</CodeTab>
<CodeTab label="sidebar.json" language="json">

```
{
  "homeLabel": "Overview",
  "navGroups": [
    { "name": "Getting started", "collapsed": false },
    { "name": "Reference", "collapsed": true }
  ]
}
```

</CodeTab>
<CodeTab label="pageTools.json" language="json">

```
{
  "repositoryUrl": "https://github.com/acme/docs",
  "feedback": { "enabled": true, "action": "", "inboxKey": "stratus-form" }
}
```

</CodeTab>
</CodeTabs>

<ParamList params={[{ name: "logoSource", type: "string", description: "The header logo. Set `logoAlternateSource` as well to show a different logo in dark mode." }, { name: "showVersionNumber", type: "boolean", description: "Show the latest changelog version as a badge beside the logo. Hidden when the changelog has no releases." }, { name: "repositoryUrl", type: "string", description: "The site's source repository. Every page's \"Edit this page\" link is built from it — a fork only has to set it once. A `/tree/<branch>` suffix names the branch edit links target." }, { name: "navGroups", type: "{ name, collapsed }[]", description: "Sidebar group order. A group used in frontmatter but missing here is appended rather than dropped." }]}/>

## Navigation

The sidebar is derived from page frontmatter, not from a list you maintain by hand. A page's `group` puts it in a group and `order` places it within one.

<Alert variant="tip" title="A page can exist outside the nav" text="A page with no `group` still builds and is searchable — useful for landing pages you link to directly."/>

Set `collapsed: true` on a group in `navGroups` and it renders as a disclosure, closed unless the reader is on a page inside it.

## Versions

The header badge is a label, not a switcher: it says which version of the product these docs describe. It reads the newest release in the [changelog](/changelog/), so cutting a release updates it — turn it off with `showVersionNumber` in `header.json`.

<Alert variant="warning" title="Serving several versions at once is a hosting decision" text="This template builds one version of the docs. Publishing an older set means building that branch separately and mounting it at its own path — the template has no opinion about how."/>

## Environment

Anything secret — analytics keys etc — belongs in the environment at build time rather than in `src/data/`, which is public.
