Creating a TOC from a slice zone headers

I am trying to figure out how I can make a TOC (Table Of Contents) in NUXT from all the headers in a slice zone.

If I am building a page with for example 4 paragraphs each with a H2 header and some H3 headers I want to take out all those headers from the slice zone and then build the TOC.

Does anyone have a good approach to this?

Hi Morten,

Welcome to the community!

I actually explain how to do that in Vue/Nuxt on this post here:

Let me know if you have any questions about this.


That works perfectly! Thanks! :slight_smile:

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.