Skip to content

Getting Started

How to install and use the Six theme for Starlight.

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.

  1. @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-mono
  2. 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: [{ // optional
    label: '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',
    }),
    ],
    })
  3. Start the development server to preview the plugin in action.

That’s it! You can now use the theme in your project. 🎉

With the automatic defaults, you can get started with just the plugin configuration:

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({
// Theme-specific options (all optional)
navLinks: [
{ label: 'Docs', link: '/getting-started' },
],
})
],
// That's it! The theme provides defaults for logo, title, favicons, etc.
}),
],
})

You can override any default by providing your own values:

astro.config.mjs
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()
],
}),
],
})