Getting Started
How to install and use the Six theme for Starlight.
Prerequisites
Section titled “Prerequisites”You will need to have a Starlight website set up. If you don’t have one yet, you can follow the “Getting Started” guide in the Starlight docs to create one.
Installation
Section titled “Installation”-
@six-tech/starlight-theme-six
is a Starlight plugin. Install it by running the following command in your terminal:Terminal window npm install @six-tech/starlight-theme-six @fontsource/inter @fontsource/jetbrains-monoTerminal window pnpm add @six-tech/starlight-theme-six @fontsource/inter @fontsource/jetbrains-monoTerminal window yarn add @six-tech/starlight-theme-six @fontsource/inter @fontsource/jetbrains-mono -
Configure the plugin in your Starlight configuration in the
astro.config.mjs
file.astro.config.mjs import starlight from '@astrojs/starlight'import { defineConfig } from 'astro/config'import starlightThemeSix from '@six-tech/starlight-theme-six'export default defineConfig({integrations: [starlight({plugins: [starlightThemeSix({navLinks: [{ // optionallabel: 'Docs',link: '/getting-started',}],footerText: //optional'Built & designed by [shadcn](https://twitter.com/shadcn). Ported to Astro Starlight by [Adrián UB](https://github.com/adrian-ub). The source code is available on [GitHub](https://github.com/six-tech/starlight-theme-six).'})],title: 'My Docs',}),],}) -
Start the development server to preview the plugin in action.
That’s it! You can now use the theme in your project. 🎉
Minimal Configuration
Section titled “Minimal Configuration”With the automatic defaults, you can get started with just the plugin configuration:
import starlight from '@astrojs/starlight'import { defineConfig } from 'astro/config'import starlightThemeSix from '@six-tech/starlight-theme-six'
export default defineConfig({ integrations: [ starlight({ plugins: [ starlightThemeSix({ // Theme-specific options (all optional) navLinks: [ { label: 'Docs', link: '/getting-started' }, ], }) ], // That's it! The theme provides defaults for logo, title, favicons, etc. }), ],})
Overriding Defaults
Section titled “Overriding Defaults”You can override any default by providing your own values:
import { getFavIcons } from '@six-tech/starlight-theme-six/utils/favicons'
export default defineConfig({ integrations: [ starlight({ plugins: [starlightThemeSix({ /* theme config */ })],
// Override defaults title: 'My Custom Title', logo: { src: './src/assets/my-logo.svg', }, lastUpdated: false, // Disable last updated tableOfContents: { minHeadingLevel: 2, // Start from H2 maxHeadingLevel: 4, // End at H4 }, head: [ // Add favicon configuration manually ...getFavIcons({ basePath: '/my-project/' }), // For subdirectory deployment // Or for root deployment: ...getFavIcons() ], }), ],})