feat: add anchoring of headings

This commit is contained in:
Alexander Daichendt 2022-07-27 14:34:11 +02:00
parent 5ec007a9c9
commit aa8b9cd303
3 changed files with 70 additions and 1 deletions

View file

@ -1,6 +1,8 @@
import { defineMDSveXConfig as defineConfig } from 'mdsvex';
import remarkGFM from 'remark-gfm';
import remarkEmoji from 'remark-emoji';
import rehypeSlug from 'rehype-slug';
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
const config = defineConfig({
layout: {
@ -13,7 +15,7 @@ const config = defineConfig({
},
remarkPlugins: [remarkGFM, remarkEmoji],
rehypePlugins: [],
rehypePlugins: [rehypeSlug, rehypeAutolinkHeadings],
});
export default config;