Skip to content

Getting started

This site is an Astro Starlight project that lives alongside the CMS in the main repository, at src/docs.nri-inc.org/.

Terminal window
cd src/docs.nri-inc.org
npm install
npm run dev

The dev server prints a local URL — usually http://localhost:4321. Pages hot-reload as you edit them.

Every file under src/content/docs/ becomes a page. The path maps directly to the URL, so src/content/docs/guides/releases.md is served at /guides/releases/.

---
title: Cutting a release
description: How a change gets from master to production.
---
Your content here.

title is required. description is optional but feeds the page’s meta tags, so it is worth writing.

The Guides and Reference sidebar sections are autogenerated from their directories, so a new file in either shows up without touching the config. Use sidebar.order in the frontmatter to control where it lands.

GitHub-flavored alert syntax works, via the starlight-github-alerts plugin:

> [!NOTE]
> Useful context.
> [!WARNING]
> Something that could bite you.

GitHub has five alert types and Starlight has four aside styles, so one pair has to share. This is how they map here:

GitHub syntax Renders as
[!NOTE] Note
[!IMPORTANT] Note
[!TIP] Tip
[!WARNING] Caution
[!CAUTION] Danger

[!NOTE] and [!IMPORTANT] render identically, so avoid putting the two next to each other — the reader sees two identical boxes.

The plugin’s own default maps [!IMPORTANT] to Caution. astro.config.mjs overrides that, because GitHub’s IMPORTANT is informational rather than a hazard, and this keeps Caution and Danger free to mean escalating levels of “this can hurt you”.

Starlight’s own aside syntax (:::note, :::caution) still works and is used on some pages. Either is fine; prefer matching whatever the page already uses.

Command What it does
npm run dev Astro dev server with hot reload
npm run build Static build into dist/
npm run preview Serve the built site through the Workers runtime
npm run check Type-check content collections and config
npm run deploy Build, then deploy to Cloudflare
  • docs/design/*.html in the repository root — living component specs for the design system. These are the source of truth for their components.
  • src/NRI.CMS/Client/README.md — the block-port pattern, static-vs-hydrated islands, and the dev SSR architecture.
  • AGENTS.md — standing rules for anyone (human or agent) working in the repo.