Correct way to generate a Table of Contents (top) in Nuxt Content v2? #1343
-
|
This may be a dumb question but is there a recommendation for how to properly generate the Table of Contents (based on h1-h6 tags) for a page in Nuxt Content v2? I see there is a configuration option for "toc" (https://content.nuxtjs.org/api/configuration#toc), however, I can't find a reference on how to access it anywhere in the documentation. I've looked through the returned value of Like, is there an undocumented Any help is most appreciated. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
Just realized that I had missed the So, for anyone else wondering the same thing, look for |
Beta Was this translation helpful? Give feedback.

Just realized that I had missed the
tockey insidedoc.body. Doh!So, for anyone else wondering the same thing, look for
doc.body.tocand that will provide you an array oflinksthat you can use to generate your table of contents.