0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00
astro/examples/with-markdown-plugins/astro.config.mjs
Juan Martín Seery de123b28b3
refactor(markdown): removed rehype-slug in favor of our own implementation (#3234)
* Moved types arround

* Removed `rehype-slug` in favor of our own implementation

* Changeset

* Removed rehype-slug from examples

* Remove rehype-slug from tests

* Updated reference

* rehypeCollectHeaders is a function again

* Reverted rehype-slug removes

* Re-added rehype-slug to reference
2022-04-29 21:07:09 -03:00

16 lines
451 B
JavaScript

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