add heading slugs

This commit is contained in:
2021-10-21 21:25:28 -07:00
parent cb04687d0b
commit 14d74ccdee
3 changed files with 54 additions and 9 deletions

View File

@@ -1,10 +1,14 @@
import { mdsvex } from 'mdsvex';
import staticAdapter from '@sveltejs/adapter-static';
import slug from './src/lib/slug.js';
const config = {
extensions: ['.svelte', '.svx'],
preprocess: mdsvex({layout: './src/lib/Post.svelte'}),
preprocess: mdsvex({
layout: './src/lib/Post.svelte',
rehypePlugins: [slug],
}),
kit: {
// hydrate the <div id="svelte"> element in src/app.html
target: '#svelte',