-
I maintain a documentation website that has several different sources of generated markdown files. Those generated files use many more header levels (some as deep as 6) than the default starlight configuration uses (seems to be 3 from the documentation). Is there a way for starlight to properly render headers beyond level 3? I don't need it to be generated as part of the sidebar (though that would be cool to have the option).
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
👋 Two routes would be available to address your issue:
It sounds like you may be more interested by the first solution if you have many pages so editing your export default defineConfig({
integrations: [
starlight({
title: 'My docs',
// Update the table of contents minimum and maximum heading level.
tableOfContents: { minHeadingLevel: 2, maxHeadingLevel: 6 }
}),
],
}); |
Beta Was this translation helpful? Give feedback.
👋 Two routes would be available to address your issue:
tableOfContents
option which let you configure the minimum and maximum level to include in the table of content for all pages.tableOfContents
option.It sounds like you may be more interested by the first solution if you have many pages so editing your
astro.config.mjs
to update your Starlight configuration to the following will do the trick: