Getting started

Quickstart

Set up your development environment and add your first page

Set up your environment

1

Install dependencies

From the project root, install the required packages:

npm install
2

Start the dev server

Run the Astro development server:

npm run dev

Open the URL shown in your terminal (usually http://localhost:4321) to see your site.

3

Edit a page

Open docs/index.mdx in your editor and make a change. You'll see changes in your local preview.

Project structure

Your content lives in the docs/ directory:

PathPurpose
docs/*.mdxDocumentation pages written in MDX.
docs/docs.jsonConfiguration for navigation and site metadata.
docs/images/Images referenced from your pages.
src/Astro layouts, components, and styles you can customize.

Add a new page

1

Create an MDX file

Create a new file in the docs/ directory. For example, docs/my-page.mdx:

docs/my-page.mdx
---
title: "My page"
description: "A brief description of this page"
---

Write your content here using MDX.
2

Add it to navigation

Open docs/docs.json and add the page path (without the .mdx extension) to the relevant navigation group:

docs/docs.json
{
  "group": "Getting started",
  "pages": [
    "index",
    "quickstart",
    "my-page"
  ]
}

Deploy

Push your changes to GitHub. If your hosting is configured to build on push, your site deploys automatically.

To build the site locally:

npm run build

The output goes to the dist/ directory.

Next steps