A table of contents (TOC) might seem unnecessary especially for shorter articles, but they play a crucial role in SEO as well.
The TOC component will improve readability, clue search engines into your page hierarchy and increase odds that your result will have jump links in search results that improve conversion.
Notice the little extra links below the meta description in the image below? These are jump links. Even tiny differences like this can make a signifcant impact in the long run as they improve click-through rate.
Check out our blog post on how to create a table of contents if you're using Contentful as your headless CMS. The same concepts should apply for other headless CMS vendors as well.
Title at the top of your table of contents box.
'Each object in the array should contain a `label` and an `href` representing an anchor fragment .