diff options
author | 2022-02-04 15:49:50 -0300 | |
---|---|---|
committer | 2022-02-04 13:49:50 -0500 | |
commit | cfeaa9414acdecec6f5d66ee0e33fe4fde574eee (patch) | |
tree | 2c27727d025905958c76614693184f83db106033 /examples/with-markdown-plugins/astro.config.mjs | |
parent | 8f9b1cbc8bf76455efa96ab591d6293aa8a43964 (diff) | |
download | astro-cfeaa9414acdecec6f5d66ee0e33fe4fde574eee.tar.gz astro-cfeaa9414acdecec6f5d66ee0e33fe4fde574eee.tar.zst astro-cfeaa9414acdecec6f5d66ee0e33fe4fde574eee.zip |
fix: import local plugins into markdown (#2534)
* Replaced "UnifiedPluginImport" for a function
* Updated tests
* Updated docs
* Updated examples
* Added changeset
* Fixed tests
* Removed unused "UnifiedPluginImport"
* Duplicated add-classes.mjs
Diffstat (limited to 'examples/with-markdown-plugins/astro.config.mjs')
-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'], }, ], }, |