Skip to content

Commit 4a01100

Browse files
committed
[Docs Site] Make rehype output fragments
1 parent b63fa0f commit 4a01100

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/components/AnchorHeading.astro

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ const slugified = GithubSlug(slug ?? title);
2121
const tag = `h${depth}` as "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
2222
2323
const file = await rehype()
24+
.data("settings", {
25+
fragment: true,
26+
})
2427
.use(rehypeAutoLinkHeadings)
2528
.process(`<${tag} id=${slugified}>${marked.parseInline(title)}</${tag}>`);
2629

0 commit comments

Comments
 (0)