feat: add table of contents to posts (WIP)

This commit is contained in:
grassblock 2025-06-06 22:55:20 +08:00
parent 9ecf25f3ab
commit 145ef1f2b4
3 changed files with 101 additions and 14 deletions

View file

@ -3,6 +3,7 @@ import { defineConfig } from 'astro/config';
import sitemap from '@astrojs/sitemap';
import mdx from '@astrojs/mdx';
import remarkToc from 'remark-toc';
import cloudflare from '@astrojs/cloudflare';
@ -19,7 +20,10 @@ export default defineConfig({
shikiConfig: {
theme: 'nord',
wrap: true
}
},
remarkPlugins: [
[remarkToc, { heading: 'Contents', maxDepth: 3 }]
]
},
integrations: [sitemap(), mdx()],