Local Development
-
Install dependencies:
Terminal window bun install -
Run the dev server:
Terminal window bun run dev # astro dev — http://localhost:4321
Scripts
Section titled “Scripts”| Script | Command | Purpose |
|---|---|---|
dev |
astro dev |
Local dev server |
build |
astro build |
Build to ./dist |
preview |
bun run build && wrangler dev |
Preview on the Workers runtime |
deploy |
bun run build && wrangler deploy |
Build + deploy to Cloudflare |
generate-types |
wrangler types |
Regenerate Cloudflare types |
Authoring content
Section titled “Authoring content”Add a .mdx file under src/content/docs/; the sidebar picks it up
automatically (autogenerated directories) or when you add it to a topic’s
explicit item list in astro.config.mts.
Frontmatter
Section titled “Frontmatter”---title: Architecturedescription: One-line summary shown in search and social cards.sidebar: order: 2 # position within an autogenerated directory---The landing page uses template: splash with a hero block; regular pages just
use title / description / sidebar.order.
Adding a service page
Section titled “Adding a service page”Each service folder follows the same three-page pattern — drop the file in and
it sorts by sidebar.order:
index.mdx— Overview (order: 1), starting with a<ServiceInfo>block.architecture.mdx— Architecture (order: 2).development.mdx— Local Development (order: 3).
Components & diagrams
Section titled “Components & diagrams”Import Starlight components in MDX as needed:
import { Steps, Aside, Card, CardGrid, LinkCard, FileTree } from '@astrojs/starlight/components';import ServiceInfo from '@/components/ServiceInfo.astro';<Steps>for numbered setup,<Aside>for callouts,<FileTree>for structure,<CardGrid>/<LinkCard>for navigation.- Mermaid diagrams go in fenced
```mermaidblocks (rendered byastro-mermaid).
Deployment
Section titled “Deployment”The site is a Cloudflare Worker (docs). bun run deploy builds with the
Astro Cloudflare adapter and ships with wrangler. It deploys from main.