svelteness / kit-docs

Documentation integration for SvelteKit.
https://kitdocs.vercel.app
MIT License
457 stars 32 forks source link

How to enable the `on-this-page` menu? #99

Closed ANovokmet closed 2 months ago

ANovokmet commented 2 months ago

I can't seem to figure it out. My pages just show a blank element where the menu should be.

Relevant code seems to be https://github.com/svelteness/kit-docs/blob/main/packages/kit-docs/src/lib/components/layout/OnThisPage.svelte#L21

michael-voit commented 2 months ago

@ANovokmet The moment you have several headlines in the document, the on-this-page sidebar is shown automatically.

If this doesn't work, please share the code of your content file.

ANovokmet commented 2 months ago

@michael-voit Thanks, you're right. It is working. Only for headers level 2 and 3 (##, ###), while I had only those of level 1.

michael-voit commented 2 months ago

Great!