Skip to content

Configuration

The Starlight Group Pages plugin can be configured inside the astro.config.mjs configuration file of your project:

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

The Starlight Group Pages plugin accepts the following configuration options:

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/**.

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”.

Type: 'grid' | 'list'
Default: 'grid'

The layout of the link cards:

  • grid: a responsive grid using the Starlight <CardGrid> component
  • list: one link card below the other

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 group
  • label: turns the group label into a link and keeps a separate button to expand and collapse the group
  • false: adds no link

See “Sidebar and pagination” and compare the item and label options in the demo.