-
-
Notifications
You must be signed in to change notification settings - Fork 728
Description
Is your feature request related to a problem? Please describe
I can get the more depth heading by setting the nuxt.config.ts
export default defineNuxtConfig({
content: {
markdown: {
toc: {
depth: 5,
searchDepth: 5
}
}
}
})but the toc for h5 and h6 not the same as h1~h4, they don't has the depth information
Describe the solution you'd like
maybe I can tell the level of the H5 or H6 depend on their parent level,
Describe alternatives you've considered
but I think also add the depth field for H5 and H6 can be more convenience for developers.
Additional context
the ProseH1, ProseH5 and ProseH6 also different, they don't wrap the <NuxtLink> component, for example the ProseH5.vue is
<template>
<h5><slot /></h5>
</template>but the ProseH2 ~ ProseH4 components can provide an anchor link, for example the ProseH2.vue is
<template>
<h2 :id="id">
<NuxtLink :href="`#${id}`">
<slot />
</NuxtLink>
</h2>
</template>
<script setup lang="ts">
defineProps<{ id: string }>()
</script>Sometimes a long blog post has the H5 or H6 level heading, but it can't provide the anchor link like other headings to click and navigate, it maybe confuse readers.
Although I can custom the Prose components for H5 and H6, but I think wrapping the <NuxtLink> component inside all the Heading Prose components maybe better.
