diff --git a/src/components/TableOfContents.astro b/src/components/TableOfContents.astro index 4cab6d5..2859777 100644 --- a/src/components/TableOfContents.astro +++ b/src/components/TableOfContents.astro @@ -6,10 +6,12 @@ interface Props { } const { headings } = Astro.props; + +const showTOC = headings && headings.length > 2; --- { - headings?.length && ( + showTOC && (