# starlight-theme-celestia

A clean, modern theme for [Astro Starlight](https://starlight.astro.build/), forked from [starlight-theme-nova](https://github.com/ocavue/starlight-theme-nova).

## Features

- **No sidebar borders** — seamless layout between content and sidebars
- **Inter font** — self-hosted via `@fontsource/inter`, 14px base size
- **Wider content** — 55rem content width, 17rem sidebars
- **3-way theme toggle** — cycles through Auto, Light, and Dark
- **Warm accent colors** — `#fb923c` (dark) / `#c2410c` (light)
- **Multi-sidebar** — built-in switchable sidebars, one per top-level `sidebar` group
- **Version dropdown** — built-in `starlight-versions` integration with auto-detected header dropdown

## Installation

```bash
bun add starlight-theme-celestia
# or
npm install starlight-theme-celestia
```

## Usage

```js
import { defineConfig } from "astro/config";
import starlight from "@astrojs/starlight";
import starlightCelestiaTheme from "starlight-theme-celestia";

export default defineConfig({
  integrations: [
    starlight({
      title: "My Docs",
      plugins: [starlightCelestiaTheme()],
      sidebar: [{ label: "Guide", autogenerate: { directory: "guide" } }],
    }),
  ],
});
```

### Options

```js
starlightCelestiaTheme({
  // Navigation items in the header bar
  nav: [
    { label: "Blog", href: "/blog" },
    { label: "GitHub", href: "https://github.com" },
  ],
  // CSS delivery mode: 'detect' (default), 'css', or 'tailwind'
  stylingSystem: "detect",
});
```

### Multi-Sidebar

Set the `multiSidebar` option to turn every top-level entry of the Starlight `sidebar` config into its own sidebar, with a switcher to move between them:

```js
starlightCelestiaTheme({
  multiSidebar: {
    // 'horizontalList' (default), 'dropdown', or 'hidden'
    switcherStyle: "horizontalList",
  },
});
```

Every top-level entry must be a group or autogenerated when this is set.

This replaces `@lorenzo_lewis/starlight-utils`, which is deprecated on npm.
Unlike that plugin, the grouping happens while the sidebar renders rather than in a route middleware, so it also works alongside `starlight-versions` regardless of plugin order.

### Versioning

The theme ships `starlight-versions` as a dependency. When configured, a version dropdown automatically appears next to the site title:

```js
import starlightVersions from "starlight-versions";

// Inside starlight({ plugins: [...] })
starlightVersions({
  current: { label: "v2.0 (latest)" },
  versions: [{ slug: "v1", label: "v1.0" }],
});
```

## License

MIT
