Frontmatter
Starlight Table of Contents Overview Customizer uses Astroβs content collections, which are configured in the src/content.config.ts
file.
Update the content config file to add support for customizing individual pages using the frontmatter:
import { defineCollection } from 'astro:content';import { docsLoader } from '@astrojs/starlight/loaders';import { docsSchema } from '@astrojs/starlight/schema';import { tocOverviewCustomizer } from "starlight-toc-overview-customizer/schema";
export const collections = { docs: defineCollection({ loader: docsLoader(), schema: docsSchema({ extend: tocOverviewCustomizer }) }),};
This allows you to specify a specific overview title for each page in your documentation like this:
---title: DemooverviewTitle: HELLO! I am a custom overview title!---
Check out the demo page for an example of this in action.