🚀 refactor: toc component with responsive design

- Implement scroll-sync highlight tracking
- Add auto-scroll functionality for active items
- Remove animations during view transitions
This commit is contained in:
radishzzz 2025-03-31 16:05:46 +01:00
parent 4c8dff619e
commit 7c6172e0ae
5 changed files with 449 additions and 309 deletions

View file

@ -6,6 +6,7 @@ import robotsTxt from 'astro-robots-txt'
import { defineConfig } from 'astro/config'
import rehypeExternalLinks from 'rehype-external-links'
import rehypeKatex from 'rehype-katex'
import rehypeSlug from 'rehype-slug'
import remarkMath from 'remark-math'
import UnoCSS from 'unocss/astro'
import { themeConfig } from './src/config'
@ -56,6 +57,7 @@ export default defineConfig({
remarkReadingTime,
],
rehypePlugins: [
rehypeSlug,
rehypeKatex,
[
rehypeExternalLinks,