-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmdsvex.config.js
33 lines (28 loc) · 1.04 KB
/
mdsvex.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { resolve, join, dirname } from 'path';
import { fileURLToPath } from 'url';
import { defineMDSveXConfig as defineConfig } from 'mdsvex';
import relativeImages from 'mdsvex-relative-images';
import emoji from 'remark-emoji';
import readingTime from 'remark-reading-time';
import rehypeAutoLinkHeadings from 'rehype-autolink-headings';
import rehypeExternalLinks from 'rehype-external-links';
import rehypeSlug from 'rehype-slug';
import headings from '@sveltinio/remark-headings';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const mdsvexConfig = defineConfig({
extensions: ['.svelte.md', '.md', '.svx'],
smartypants: {
dashes: 'oldschool'
},
layout: {
page: resolve(join(__dirname, `./themes/dockerz/components/md-layout.svelte`))
},
remarkPlugins: [headings, emoji, readingTime(), relativeImages],
rehypePlugins: [
rehypeSlug,
[rehypeExternalLinks, { target: '_blank', rel: ['noopener', 'noreferrer'] }],
[rehypeAutoLinkHeadings, { behavior: 'wrap' }]
]
});
export default mdsvexConfig;