Configuration
The Starlight Group Pages plugin can be configured inside the astro.config.mjs configuration file of your project:
import starlight from "@astrojs/starlight";import { defineConfig } from "astro/config";import starlightGroupPages from "starlight-group-pages";
export default defineConfig({ integrations: [ starlight({ plugins: [ starlightGroupPages({ // Configuration options go here. }), ], title: "My Docs", }), ],});Configuration options
Section titled “Configuration options”The Starlight Group Pages plugin accepts the following configuration options:
exclude
Section titled “exclude”Type: string[]
Default: []
A list of glob patterns matching directories to ignore. Matching directories get no generated page, their index page is not extended, and their sidebar group gets no “Overview” link.
Patterns match directory paths relative to src/content/docs/, without the locale of multilingual sites, e.g. reference or reference/**.
extendIndexPages
Section titled “extendIndexPages”Type: boolean
Default: true
Whether to append the link cards of a directory to its existing index page, e.g. guides/index.mdx.
See “Add an introduction”.
layout
Section titled “layout”Type: 'grid' | 'list'
Default: 'grid'
The layout of the link cards:
grid: a responsive grid using the Starlight<CardGrid>componentlist: one link card below the other
sidebarLink
Section titled “sidebarLink”Type: 'item' | 'label' | false
Default: 'item'
How sidebar groups link to their group page:
item: adds an “Overview” link as the first item of the grouplabel: turns the group label into a link and keeps a separate button to expand and collapse the groupfalse: adds no link
See “Sidebar and pagination” and compare the item and label options in the demo.