Skip to content

Starlight

Install @nightwire/starlight in a Starlight project. Add it as a Starlight plugin, not as a second Astro integration:

import starlight from '@astrojs/starlight'
import nightwireStarlight from '@nightwire/starlight'
import { defineConfig } from 'astro/config'
export default defineConfig({
integrations: [
starlight({
title: 'Project documentation',
plugins: [nightwireStarlight({ defaultFlavor: 'nocturne', accent: 'indigo' })],
}),
],
})
Option Default Accepted values
defaultFlavor nocturne abyss, nocturne, twilight, lumen
accent indigo indigo, iris, flux, synth, alarm, flare, volt, matrix, circuit, ice, arc, steel

Try the theme select in this site’s header. The plugin remembers a visitor’s selection and falls back to Lumen when the system prefers light. It sets data-flavor for Nightwire and Expressive Code and keeps Starlight’s data-theme in sync.

The plugin supplies Starlight’s ThemeProvider and ThemeSelect overrides and an early script in the head entries. If you replace Head, keep rendering those entries. Site customCss comes after the Nightwire theme. The plugin uses four synchronized Expressive Code themes, preserves other Expressive Code options, and respects expressiveCode: false. Changing the interface accent does not recolor syntax.