From eee9f6c1735713064eeac57080ff83186162d334 Mon Sep 17 00:00:00 2001 From: KinhoLeung Date: Wed, 30 Oct 2024 23:13:14 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20Add=20TOC=20highlighting=20?= =?UTF-8?q?effect?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/widget/TOC.astro | 37 ++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/src/components/widget/TOC.astro b/src/components/widget/TOC.astro index 4fabe9fce..8585a5d8a 100644 --- a/src/components/widget/TOC.astro +++ b/src/components/widget/TOC.astro @@ -51,9 +51,9 @@ const maxLevel = siteConfig.toc.depth; ---
{headings.filter((heading) => heading.depth < minDepth + maxLevel).map((heading) => - + " data-heading={heading.slug}>
} {heading.depth == minDepth + 2 &&
}
-
{removeTailingHash(heading.text)}
)} + +