diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/with-markdown-plugins/astro.config.mjs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/examples/with-markdown-plugins/astro.config.mjs b/examples/with-markdown-plugins/astro.config.mjs index 0fbb40de6..908b64cb0 100644 --- a/examples/with-markdown-plugins/astro.config.mjs +++ b/examples/with-markdown-plugins/astro.config.mjs @@ -6,6 +6,7 @@ // 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'; +import addClasses from './add-classes.mjs'; // @ts-check export default /** @type {import('astro').AstroUserConfig} */ ({ @@ -15,12 +16,7 @@ export default /** @type {import('astro').AstroUserConfig} */ ({ 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', - ], + rehypePlugins: [['rehype-autolink-headings', { behavior: 'prepend' }], ['rehype-toc', { headings: ['h2', 'h3'] }], [addClasses, { 'h1,h2,h3': 'title' }], 'rehype-slug'], }, ], }, |