# Installation

Copy the template, run it locally, add your first page.

Source: https://bugstars-docs.pages.dev/installation/

---

## Prerequisites

* Node 22.12 or newer
* npm. The committed lockfile is npm's, so pnpm and yarn aren't supported
* A GitHub account. There is no installer and no npm package: the template is a repository you copy and then own.

## Copy the template

Two routes, both ending with a repository of your own.

### From GitHub

Open [Use this template](https://github.com/CloudCannon/stratus-astro-documentation-template/generate) on the repository, name your copy, then clone it and install:

<CodeBlock language="bash" filename="terminal" showCopy={true}>

```
git clone https://github.com/your-org/acme-docs.git
cd acme-docs
npm ci
```

</CodeBlock>

<Alert variant="note" title="npm ci, not npm install" text="`npm ci` installs the exact versions in the lockfile. A bare `npm install` can rewrite it in a way that breaks the Linux build in CI."/>

### From CloudCannon

Use the **Deploy to CloudCannon** button at the top of the repository's README. CloudCannon copies the repository for you, runs the first build, and opens the site with visual editing already wired up — every component on this site carries the CloudCannon configuration that makes it editable on the page.

<Alert variant="warning" title="CloudCannon is a paid product" text="Building and hosting a site on CloudCannon requires a paid plan — see [CloudCannon pricing](https://cloudcannon.com/pricing/). The template itself is MIT licensed and builds anywhere — see “Do I have to use CloudCannon?” below."/>

## Run the dev server

<CodeBlock language="bash" filename="terminal" showCopy={true}>

```
npm run dev

  → docs ready at http://localhost:4321
  → watching src/content/docs for changes
```

</CodeBlock>

<Alert variant="tip" title="Port already in use?" text="Pass `--port 5000`, or set `server.port` in `astro.config.mjs`."/>

## Add your first page

Create an `.mdx` file anywhere under `src/content/docs/`. The path becomes the URL.

<Alert variant="warning" title="The extension must be .mdx" text="Only `.mdx` files are loaded. A `.md` file in `src/content/docs/` is skipped without an error, so the page simply never appears. MDX is Markdown plus components — write it exactly as you would Markdown."/>

<CodeBlock language="mdx" filename="src/content/docs/webhooks.mdx" showCopy={true}>

```
---
title: Webhooks
description: Receive events as they happen.
group: Guides
order: 2
---

Subscribe to events and we'll POST them to your endpoint.
```

</CodeBlock>

## Deploy

`npm run build` emits a static `dist/` — search index included — that any static host will serve. No server runtime, no database. CloudCannon runs the same command; so does Netlify, Vercel or a GitHub Actions job that pushes to Pages. [Going live](/going-live/) walks through hosting it and replacing the template's placeholders.

## Common questions

<FaqSection heading="" items={[{ title: "My new page isn't in the sidebar. Is it broken?", contentSections: [{ _component: "building-blocks/core-elements/text", text: "No — the sidebar is derived, not configured. A page appears in it once its frontmatter has a `group`; without one the page still builds, still has a URL and is still searchable, it just has no sidebar entry. `order` places it within the group, and the groups themselves are ordered by `navGroups` in `src/data/sidebar.json`.", size: "md" }] }, { title: "Do I have to use CloudCannon?", contentSections: [{ _component: "building-blocks/core-elements/text", text: "No. This is a plain Astro site — `npm run build` emits a static `dist/` whatever you edit it with. The template was built for CloudCannon, and the YAML beside each component is what makes the site editable on the page for non-technical teammates; ignore it and nothing breaks. Using CloudCannon does require a [paid plan](https://cloudcannon.com/pricing/).", size: "md" }] }, { title: "Where do the colors and fonts live?", contentSections: [{ _component: "building-blocks/core-elements/text", text: "Colors, spacing, radius and shadows are design tokens under `src/styles/` — see [Theming](/theming/) and the [token reference](/theming/token-reference/). Fonts are the one exception: they change in `site-fonts.mjs` only, so the preload tags and the CSS can't disagree.", size: "md" }] }, { title: "How do I get rid of the Stratus branding?", contentSections: [{ _component: "building-blocks/core-elements/text", text: "Run `npm run reset:starter`. It clears the logo, favicons and topbar links, sets the SEO name and title format and your production domain, removes the template's changelog releases, and empties the repository URL, footer links and announcement bar — the placeholders `npm run check` warns about until you do.", size: "md" }] }]}/>

Once it runs, the repository is yours: [the original](https://github.com/CloudCannon/stratus-astro-documentation-template) is only a starting point, and nothing pulls updates back down.
