This repository contains the source code for the StreamElements documentation, built with Astro and Starlight.
npm install
npm run dev # dev server at localhost:4321
npm run build # production build (also validates all internal links)
npm run preview # preview the production buildRequires Node.js >= 22.12.
src/content/docs/— documentation pages (Markdown/MDX). The sidebar is configured per topic inastro.config.mjs.src/content/changelog/{product}/YYYY-MM-DD-slug.mdx— changelog entries. The folder name is the entry's product; entries appear at/changelog/with per-product feeds and RSS.src/components/— shared components (ChatExample,PlatformBadges) and Starlight overrides.grammars/— the customstreamelementssyntax-highlighting grammar for command examples.
Command/feature pages can declare platforms: [twitch, youtube, trovo, kick] in frontmatter to render platform badges under the title.
The site deploys to Cloudflare Workers (static assets, no worker script) as docs on docs.streamelements.com — see wrangler.jsonc.
- Validation — GitHub Actions (
.github/workflows/ci.yml) builds every PR and push tomaster; the build itself validates internal links, content schemas, and redirects. No Cloudflare secrets needed in GitHub. - Deployment — Cloudflare Workers Builds (repo connected in the Cloudflare dashboard: Worker → Settings → Builds). The default deploy command
npx wrangler deployis all it needs —build.commandinwrangler.jsoncruns the Astro build first. Pushes tomasterdeploy production; other branches get preview URLs. - Manual deploys —
pnpm deploy(requireswrangler login).
Old Docusaurus URLs are preserved via the redirects map in astro.config.mjs, which is emitted two ways at build time: meta-refresh pages (any host, local preview) and a dist/_redirects file that Cloudflare serves as real HTTP 301s. The legacy /patch-notes/rss.xml and /patch-notes/atom.xml feed URLs keep serving the changelog feed directly.
We welcome contributions to this document. Please see our Contributing Guide for more information.