Skip to content

Commit

Permalink
fix: support non-root level hide-toc logic (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
JessicaSachs authored Nov 6, 2024
1 parent 39e53ae commit 5b1d7d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/layout/TocTree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
>
{{ link.text }}
</NuxtLink>
<TocTree v-if="link.children" :links="link.children" :level="level + 1" />
<TocTree v-if="link.children"
:links="(link.children || []).filter((x: any) => x.id !== 'hide-toc')"
:level="level + 1" />
</li>
</ul>
</template>
Expand Down

0 comments on commit 5b1d7d9

Please sign in to comment.