How to generate or create table of contents in nextjs with contentlayer rehype plugin

This guide outlines creating TOC using Next.js for static site generation, Contentlayer for markdown-to-JSON conversion, and Rehype plugins