astro/examples/with-markdown-plugins/astro.config.mjs
Matthew Phillips 2770588867
Remove rehype-add-classes (#2309)
* Remove rehype-add-classes

* Fix the markdown plugin test
2022-01-04 15:09:10 -05:00

27 lines
903 B
JavaScript

// Full Astro Configuration API Documentation:
// https://docs.astro.build/reference/configuration-reference
// @type-check enabled!
// VSCode and other TypeScript-enabled text editors will provide auto-completion,
// helpful tooltips, and warnings if your exported object is invalid.
// You can disable this by removing "@ts-check" and `@type` comments below.
import astroRemark from '@astrojs/markdown-remark';
// @ts-check
export default /** @type {import('astro').AstroUserConfig} */ ({
// Enable Custom Markdown options, plugins, etc.
markdownOptions: {
render: [
astroRemark,
{
remarkPlugins: ['remark-code-titles'],
rehypePlugins: [
['rehype-autolink-headings', { behavior: 'prepend' }],
['rehype-toc', { headings: ['h2', 'h3'] }],
[new URL('./add-classes.mjs', import.meta.url).pathname, { 'h1,h2,h3': 'title' }],
'rehype-slug',
],
},
],
},
});