feat: add table of contents to posts (WIP)
This commit is contained in:
parent
9ecf25f3ab
commit
145ef1f2b4
3 changed files with 101 additions and 14 deletions
|
@ -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()],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue