Skip to content

How to properly format markdown with more than 3 header levels? #1904

Closed Answered by HiDeoo
nonathaj asked this question in Q&A
Discussion options

You must be logged in to vote

👋 Two routes would be available to address your issue:

  • Configuring this globally using the tableOfContents option which let you configure the minimum and maximum level to include in the table of content for all pages.
  • Configuring this per page using the frontmatter 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:

export default defineConfig({
  integrations: [
    starlight({
      title: 'My docs',
      // Update the table of contents minimum and maximum heading level.
      tableOfContents: { minHeadingLevel: 2, maxH…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nonathaj
Comment options

Answer selected by delucis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants