# teamctl docs

Source for the docs site published at [teamctl.run](https://teamctl.run) (Cloudflare Pages).

## Local development

```bash
cd docs
npm install
npm run dev        # hot-reloading dev server on :4321
npm run build      # static site to docs/dist/
```

## Structure

- `src/content/docs/` — Starlight content collection (all pages live here):
  - `index.mdx` — landing hero.
  - `getting-started.md`, `concepts/`, `reference/`, `guides/`, `adrs/` — content tree.
- `src/content.config.ts` — collection definition using `@astrojs/starlight/loaders`.
- `astro.config.mjs` — sidebar + Starlight theme config.

The CI workflow `.github/workflows/docs.yml` builds on push/PR touching `docs/**`, and deploys to Cloudflare Pages on push to `main` once the `CLOUDFLARE_API_TOKEN` and `CLOUDFLARE_ACCOUNT_ID` secrets are set.

## Adding a page

1. Drop a `.md` or `.mdx` file under `src/content/docs/<section>/`. Include frontmatter with at least `title:`.
2. Add a sidebar entry in `astro.config.mjs` unless the directory is autogenerated (`adrs/` is).
3. Commit. CI builds (and deploys, on `main` with secrets set).
