Fix recipe anchor links

This commit is contained in:
Ben McCann
2023-01-27 20:05:46 -08:00
parent 4adb40b6fa
commit 0713010c31
4 changed files with 400 additions and 5 deletions

View File

@@ -1,8 +1,9 @@
import path from 'node:path';
import adapter from '@sveltejs/adapter-static';
import preprocess from 'svelte-preprocess';
import { mdsvex, escapeSvelte } from 'mdsvex';
import hljs from 'highlight.js';
import path from 'path';
import { mdsvex, escapeSvelte } from 'mdsvex';
import rehypeSlug from 'rehype-slug';
import preprocess from 'svelte-preprocess';
const extensions = [`.svelte`, '.md', `.mdx`, '.svx'];
@@ -23,7 +24,8 @@ const config = {
const highlighted = escapeSvelte(hljs.highlightAuto(code).value);
return `{@html \`<pre class="hljs"><code>${highlighted}</code></pre>\`}`;
}
}
},
rehypePlugins: [rehypeSlug]
})
],
extensions: extensions,