Set Up Compass

Install Compass, run it locally, and make the first project-level updates.

Compass is a docs template, so the first setup step is really about making the repository yours: create a new repo from the template, get it running, update the site identity, and replace the sample information architecture.

Create your docs repository

Start from the GitHub template instead of installing Compass as an npm dependency:

  1. Open the Compass repository on GitHub
  2. Click Use this template
  3. Create a new repository for your product docs, support center, or internal knowledge base
  4. Clone your new repository locally

Install and run locally

From your new project root:

npm install
npm run dev

That starts Astro’s local server so you can preview the homepage, category pages, and article templates while you edit.

Update the project identity

These are the first files most teams touch:

  • site.config.mjs for title, URLs, and repository links
  • package.json for the local project name and metadata
  • src/data/docs.ts for parent categories and sub-categories
  • src/content/docs for article content
  • README.md for package and contributor guidance

Confirm the core scripts

Compass ships with a small set of scripts you can use during development:

npm run dev
npm run check
npm run build
npm run preview
  • dev runs the local Astro server
  • check validates Astro, TypeScript, and content usage
  • build generates the production site
  • preview serves the production build locally

Once the project is running, make these changes before publishing:

  1. Replace the placeholder siteUrl in site.config.mjs
  2. Rename the sample categories in src/data/docs.ts
  3. Rewrite the sample content in src/content/docs
  4. Confirm the navigation labels in the header match your docs structure

What to expect next

After that, the next step is learning how Compass organizes categories, articles, and routes so you can reshape it without guesswork.