Skip to content

Start a docs site

This content is for v0.1. Switch to the latest version for up-to-date documentation.

In this tutorial, you add a docs site to a repository. At the end, the site runs on your computer in the Aurora theme.

You need:

  • Node 22 or later.

  • Git.

  • A repository with no docs/ folder. To try the starter, make a new one:

    Terminal window
    mkdir my-project && cd my-project && git init

Get the starter and copy its three parts into the repository:

Terminal window
git clone --depth 1 --branch v0.1.0 https://github.com/colliery-io/starlight-aurora /tmp/starlight-aurora
cp -R /tmp/starlight-aurora/template/docs /tmp/starlight-aurora/template/.github /tmp/starlight-aurora/template/.angreal .
rm -rf /tmp/starlight-aurora

You now have:

docs/ the site
.github/workflows/docs.yml the GitHub Pages workflow
.angreal/task_docs.py angreal docs build and angreal docs serve

Open docs/astro.config.mjs. Change these two lines:

const PROJECT = 'Project';
const REPO = 'https://github.com/colliery-io/project';
Terminal window
cd docs
npm install
npm run dev

If you use angreal, angreal docs serve does the same from the root of the repository.

Open http://localhost:4321. You see the home page with four cards: Tutorials, How-to guides, Reference and Explanation.

Open docs/src/content/docs/index.mdx. Replace the text after CHANGE — and save the file. The browser shows the change.

Use the theme select at the top right. Choose Light, then Dark. Auto follows the setting of your operating system.