Review your first page
Tutorial
In this tutorial, you review a page of your Starlight site in the dev toolbar and declare its documentation type, so Compass can warn you when the page drifts.
Prerequisites
Section titled “Prerequisites”Compass installed with a provider, either TypeSafe or an OpenAI-compatible model.
Review the page
Section titled “Review the page”-
Start the development server:
Terminal window npm run dev -
Open any documentation page in your browser and click the compass icon in the Astro dev toolbar at the bottom of the page.
The Compass window shows the type the page reads like, for example “Reads like a how-to guide (92% confidence)”, and suggests declaring it.
-
Declare the suggested type in the frontmatter of the page:
src/content/docs/guides/deploy.md ---title: Deploy your sitediataxis: how-to--- -
Save the file. The page reloads, Compass reviews it again, and the suggestion disappears.
-
To see what drift looks like, change the value to
diataxis: referenceand save again.The toolbar icon now shows a red dot, and the Compass window reports an error: the page is declared as reference but reads like a how-to guide. Set the value back to
how-towhen you are done.
Next steps
Section titled “Next steps”You reviewed a page while writing it and declared its type. From here, you can:
- Audit every page in CI to catch drift in pull requests.
- Add more rules, like
quality()for rubrics orduplicates()for pages covering the same topic. - Show documentation type badges to your readers.
- Let readers ask the docs from a sparkle button next to the search.
- Learn how Compass decides whether a page is a tutorial, a how-to guide, reference or explanation.
- Browse the configuration reference.