@red-glare/astro
v0.1.0
Published
Astro integration for building USWDS-styled federal documentation sites with Comark
Downloads
33
Maintainers
Readme
@red-glare/astro
Astro integration for building USWDS-styled federal documentation sites with Comark.
Real @uswds/uswds site chrome (government banner, header, sidenav, footer, identifier, breadcrumbs, in-page nav, 404), CommonMark + directive content (::alert, :::accordion, ::code-group, :::process-list, :::summary-box, :::endpoint), shiki syntax highlighting baked in at parse time, build-time link validation, opt-in Pagefind search, RSS / llms.txt / per-page .md feeds, and i18n.
Install
pnpm add @red-glare/astro
# or
npm install @red-glare/astroQuick start
// astro.config.mjs
import redGlare from '@red-glare/astro'
import { defineConfig } from 'astro/config'
export default defineConfig({
site: 'https://docs.example.gov',
integrations: [
redGlare({
title: 'Agency Documentation',
description: 'Official documentation for Agency X',
governmentBanner: true,
}),
],
})// src/content.config.ts
import { docsLoader, docsSchema } from '@red-glare/astro/schema'
import { defineCollection } from 'astro:content'
export const collections = {
docs: defineCollection({
loader: docsLoader(),
schema: docsSchema,
}),
}Drop markdown into src/content/docs/ and run astro dev.
See the main README for the full feature list and configuration reference.
License
MIT
