---
title: "Configuration"
url: "https://rigelcms.dev/docs/configuration"
description: "Configure Rigel content folders, media limits, backends and browser navigation."
---

Call `rigel()` in `astro.config.mjs`. Keep schema declarations in a separate module imported from `@rigel-cms/rigel/content`; use the package root for the Astro integration.

## Core options

| Option | Default | Purpose |
| --- | --- | --- |
| backend | "local" | Use local development writes or the "github" backend. |
| copyDir | "src/content/copy" | Folder for existing defineCopy modules. |
| schema | Unset | Developer-declared document and object types. |
| collections | Unset | Article folders and their editable metadata fields. |
| mediaDir | "rigel-media" | Media folder relative to Astro’s publicDir. |
| maxFileSize | 2 * 1024 * 1024 | Maximum upload or downloaded image size, in bytes. Must be a positive safe integer. |
| jsonOutput | "pretty" | "pretty" or "minified" for subsequent JSON saves. Existing files are not rewritten just by changing this option. |
| demo | true | Include document types marked demo: true. Set false to hide those types without deleting their files. |
| preview | Unset | Explicit page, document and collection route mappings, with optional draft and live hosts. |
| menus | Unset | Existing menu JSON folder and optional maximum nesting depth. |
| sidebar | Automatic | Explicit content links, headings and separators. |

Content folders are relative to the Astro project root. `mediaDir` is relative to `publicDir`, not the project root. Use ordinary relative folder names, without absolute paths or traversal segments.

## GitHub options

Set `backend: "github"` and `repo: "owner/repository"`. The defaults are `branch: "drafts"`, `publishBranch: "main"`, `repoRoot: ""`, `authOrigin: "https://auth.rigelcms.dev"` and `appSlug: "rigel-cms"`.

GitHub is the only supported sign-in provider. Our GitHub App and authentication service are optional defaults, not a requirement. You can use your own GitHub App and compatible authentication service by setting `appSlug` and `authOrigin`.

`repoRoot` identifies the Astro project’s folder inside the Git repository. Leave it empty for a site at the repository root. The workspace and publishing branches must differ. See [GitHub publishing](/docs/github-publishing/) for access requirements and the full publishing flow.

## Menus and sidebar

Declare menus with `menus: { folder: "src/content/menus", maxDepth: 3 }`. The maximum depth defaults to 3 and accepts integers from 1 to 10. Menu files contain `slug`, `title` and `items`; each item has a stable `id`, `label`, `url`, `children` and optional `newTab`. Editors update existing menus rather than creating or deleting menu documents. Render the links in your host templates.

For a custom sidebar, target declared names and IDs rather than their display labels:

```
sidebar: [
  { kind: "heading", label: "Website" },
  { kind: "link", target: { kind: "pages" } },
  { kind: "link", target: { kind: "menus" } },
  { kind: "heading", label: "Assets" },
  { kind: "link", target: { kind: "media" } },
]
```

A collection target is `{ kind: "collection", name: "news" }`. A shared document type target is `{ kind: "documents", type: "author" }`. Omitted content groups remain accessible under More content.

## Keep configuration public-safe

Schemas, field defaults and static editor configuration can be delivered to the browser. Do not put secrets in field values or initial values, even for a field with type `password`. A masked input is not secret storage.

The local backend is a development tool, not a public write server. Keep it on a trusted development machine. A deployed static editor needs the GitHub backend and repository authorization.

Documentation

On this page