feat: TOC highlight and scroll sync (#216)

This commit is contained in:
foxton9
2024-12-06 12:46:10 +08:00
committed by saicaca
parent b604cdf18c
commit e816120045
5 changed files with 241 additions and 2 deletions

View File

@@ -12,6 +12,7 @@ import rehypeSlug from "rehype-slug";
import remarkDirective from "remark-directive"; /* Handle directives */
import remarkGithubAdmonitionsToDirectives from "remark-github-admonitions-to-directives";
import remarkMath from "remark-math";
import remarkSectionize from "remark-sectionize";
import { AdmonitionComponent } from "./src/plugins/rehype-component-admonition.mjs";
import { GithubCardComponent } from "./src/plugins/rehype-component-github-card.mjs";
import { parseDirectiveNode } from "./src/plugins/remark-directive-rehype.js";
@@ -68,6 +69,7 @@ export default defineConfig({
remarkExcerpt,
remarkGithubAdmonitionsToDirectives,
remarkDirective,
remarkSectionize,
parseDirectiveNode,
],
rehypePlugins: [