summaryrefslogtreecommitdiff
path: root/examples/with-markdown-plugins/astro.config.mjs
blob: 26d986ce14cfba817e4fbe1fbb1b107ce31afbe8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { defineConfig } from 'astro/config';
import astroRemark from '@astrojs/markdown-remark';
import addClasses from './add-classes.mjs';

// https://astro.build/config
export default defineConfig({
	// Enable Custom Markdown options, plugins, etc.
	renderers: [],
	markdownOptions: {
		render: [
			astroRemark,
			{
				remarkPlugins: ['remark-code-titles'],
				rehypePlugins: [['rehype-autolink-headings', { behavior: 'prepend' }], ['rehype-toc', { headings: ['h2', 'h3'] }], [addClasses, { 'h1,h2,h3': 'title' }], 'rehype-slug'],
			},
		],
	},
});