Skills for setting up and customizing Astro Starlight documentation sites, covering project setup, custom theming, and component overrides.
100
100%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
Quick-reference for the most commonly used starlight({}) options in astro.config.mjs.
| Option | Type | Description |
|---|---|---|
title | string | Required. Site title shown in header and page titles. |
description | string | Default meta description for all pages. |
logo | LogoConfig | Header logo. See Logo section below. |
social | SocialLink[] | Social media links in the header. |
sidebar | SidebarItem[] | Sidebar navigation configuration. |
editLink | EditLinkConfig | "Edit page" link configuration. |
customCss | string[] | CSS files to inject. Paths relative to project root. |
components | ComponentsConfig | Override built-in UI components. |
head | HeadConfig[] | Additional HTML elements to inject into <head>. |
favicon | string | Path to favicon (relative to public/). |
tableOfContents | TableOfContentsConfig | false | Global TOC configuration. |
lastUpdated | boolean | Show last-updated date on pages. |
pagination | boolean | Show previous/next page links. |
defaultLocale | string | Default locale for i18n. |
type LogoConfig =
| { src: string; replacesTitle?: boolean; alt?: string }
| { light: string; dark: string; replacesTitle?: boolean; alt?: string }src and light/dark are mutually exclusive.
type SidebarItem =
| { label: string; slug: string } // Single link
| { label: string; items: SidebarItem[]; collapsed?: boolean } // Group with explicit items
| { label: string; autogenerate: { directory: string }; collapsed?: boolean } // Auto groupA group cannot have both items and autogenerate.
Full list from Starlight Icons Reference:
github, gitlab, discord, twitter, mastodon, linkedin, youtube, rss, email, external, seti, x.com
| Option | Description |
|---|---|
site | Canonical URL — required for sitemap generation |
base | Base path for deployment to a subdirectory |
my-docs/
├── astro.config.mjs # Starlight integration config
├── src/
│ ├── assets/ # Images, logos
│ ├── content/docs/ # All documentation pages (.md / .mdx)
│ │ ├── index.md # Homepage (route: /)
│ │ └── guides/example.md # Route: /guides/example/
│ └── styles/ # Optional custom CSS
└── public/ # Static assets served as-isnpx @astrojs/upgrade