Skip to content

Quickstart

This guide takes you from an empty directory to a themed, searchable docs site. By the end you’ll have a project you can commit and deploy.

  1. Scaffold a new Starlight site and pick the minimal template when prompted:

    Terminal window
    npm create astro@latest my-pack -- --template starlight
  2. Move into the project and add the theme:

    Terminal window
    cd my-pack
    npm install @nebari/starlight
  3. Register the plugin in astro.config.mjs:

    astro.config.mjs
    import starlight from '@astrojs/starlight';
    import { nebari } from '@nebari/starlight';
    import { defineConfig } from 'astro/config';
    export default defineConfig({
    integrations: [
    starlight({
    title: 'My Pack',
    plugins: [nebari()],
    }),
    ],
    });
  4. Run the dev server:

    Terminal window
    npm run dev

Open http://localhost:4321 and you’ll see the Nebari header, footer, and accent colors already applied.

A fresh pack has this shape. The theme owns presentation; everything under src/content/docs/ is yours to write.

  • astro.config.mjs the nebari() plugin lives here
  • package.json
  • Directorysrc
    • Directorycontent
      • Directorydocs
        • index.mdx your landing page (use the splash template)
        • Directorygetting-started
          • installation.md
          • quickstart.md
        • Directoryguides/
        • Directoryreference/
      • content.config.ts Starlight’s docs collection schema
  • Directorypublic/ static assets served as-is

Create src/content/docs/guides/hello.md:

src/content/docs/guides/hello.md
---
title: Hello, Nebari
description: My first themed page.
---
Welcome to my pack. This paragraph already uses Inter, and code blocks use Fira
Code:
```py
print("themed code, no extra setup")
```

Then add it to the sidebar in astro.config.mjs:

astro.config.mjs
sidebar: [
{
label: 'Guides',
items: [{ label: 'Hello', link: '/guides/hello/' }],
},
],
  1. Build the static site:

    Terminal window
    npm run build
  2. Preview the production build locally:

    Terminal window
    npm run preview

The dist/ directory is a plain static site — deploy it anywhere. See Deployment for platform-specific steps.