Configuration overview
The integration is configured with a single options object passed to the redGlare() factory in astro.config.mjs. Every option is validated against a zod schema — mismatches fail the build with a clear error.
import redGlare from '@red-glare/astro'
import { defineConfig } from 'astro/config'
export default defineConfig({
site: 'https://docs.example.gov',
integrations: [
redGlare({
title: 'My Agency Docs',
description: 'Official documentation for My Agency',
governmentBanner: true,
pagefind: true,
rss: true,
// ...
}),
],
})Option reference
| Option | Type | Default | Docs |
|---|---|---|---|
title | string | required | Site metadata |
description | string | — | Site metadata |
logo | string | — | Site metadata |
governmentBanner | boolean | true | Government banner |
alert | { message, type, dismissible } | — | Government banner |
editLink | { baseUrl } | — | Edit links |
sidebar | SidebarGroup[] | auto | Navigation |
nav | NavItem[] | auto from sidebar | Navigation |
footer | { links, contact, social } | — | Footer & identifier |
identifier | { agency, parentAgency, links, ... } | — | Footer & identifier |
pagefind | boolean | false | Search |
rss | boolean | false | RSS |
llms | boolean | true | llms.txt |
defaultLocale | string | "en" | i18n |
locales | Record<string, { label }> | — | i18n |
head | HeadTag[] | [] | Site metadata |
uswdsSettings | string | — | Theming |
Where options are validated
RedGlareConfigSchema is defined in packages/astro/src/config.ts. The integration calls schema.parse(userConfig) on entry, so a missing title or a wrongly-typed sidebar[].items is caught before any build work happens — you see the failure in the terminal immediately.
Re-exported types
The package exports TypeScript types for the config object — useful when you split the configuration across modules or pass it through a helper:
import type { RedGlareUserConfig } from '@red-glare/astro'
const config: RedGlareUserConfig = {
title: 'My Agency Docs',
governmentBanner: true,
}RedGlareUserConfig is the input type (defaults not yet applied). RedGlareConfig is the parsed output. Most authors want the former.