subheadings titles don't have a link because the anchor tag doesn't wrap the text of the titles.
When there is no heading component in mdx.tsx (e.g. h2), rehypeAutolinkHeadings works as expected. It seems that the transformation that's performed in mdx.tsx is not compatible with the contentlayer rehype plugin.
subheadings titles don't have a link because the anchor tag doesn't wrap the text of the titles.
When there is no heading component in
mdx.tsx
(e.g.h2
),rehypeAutolinkHeadings
works as expected. It seems that the transformation that's performed inmdx.tsx
is not compatible with the contentlayer rehype plugin.More info https://github.com/rehypejs/rehype-autolink-headings/issues/15