summaryrefslogtreecommitdiff
path: root/packages/integrations/mdx/src/index.ts
diff options
context:
space:
mode:
authorGravatar Ben Holmes <hey@bholmes.dev> 2022-08-08 17:33:35 -0500
committerGravatar GitHub <noreply@github.com> 2022-08-08 17:33:35 -0500
commit4c2ca5352d0c4119ed2a9e5e0b78ce71eb1b414a (patch)
tree9d7cc9c2f8fe13f5aa52294f79d67f4a68e3a86b /packages/integrations/mdx/src/index.ts
parent36cb503c8a8ea7c312ac408ceac27ab279104a25 (diff)
downloadastro-4c2ca5352d0c4119ed2a9e5e0b78ce71eb1b414a.tar.gz
astro-4c2ca5352d0c4119ed2a9e5e0b78ce71eb1b414a.tar.zst
astro-4c2ca5352d0c4119ed2a9e5e0b78ce71eb1b414a.zip
[MDX] Remove `frontmatterOptions` (#4204)
* feat: remove frontmatterOptions config * test: remove custom frontmatter suite * deps: remove remark-mdx-frontmatter * docs: remove `frontmatterOptions` config * chore: changeset
Diffstat (limited to 'packages/integrations/mdx/src/index.ts')
-rw-r--r--packages/integrations/mdx/src/index.ts13
1 files changed, 1 insertions, 12 deletions
diff --git a/packages/integrations/mdx/src/index.ts b/packages/integrations/mdx/src/index.ts
index 2c7247237..d88e67016 100644
--- a/packages/integrations/mdx/src/index.ts
+++ b/packages/integrations/mdx/src/index.ts
@@ -4,7 +4,6 @@ import type { AstroConfig, AstroIntegration } from 'astro';
import { parse as parseESM } from 'es-module-lexer';
import rehypeRaw from 'rehype-raw';
import remarkGfm from 'remark-gfm';
-import type { RemarkMdxFrontmatterOptions } from 'remark-mdx-frontmatter';
import remarkShikiTwoslash from 'remark-shiki-twoslash';
import remarkSmartypants from 'remark-smartypants';
import { VFile } from 'vfile';
@@ -19,12 +18,6 @@ type WithExtends<T> = T | { extends: T };
type MdxOptions = {
remarkPlugins?: WithExtends<MdxRollupPluginOptions['remarkPlugins']>;
rehypePlugins?: WithExtends<MdxRollupPluginOptions['rehypePlugins']>;
- /**
- * Configure the remark-mdx-frontmatter plugin
- * @see https://github.com/remcohaszing/remark-mdx-frontmatter#options for a full list of options
- * @default {{ name: 'frontmatter' }}
- */
- frontmatterOptions?: RemarkMdxFrontmatterOptions;
};
const DEFAULT_REMARK_PLUGINS: MdxRollupPluginOptions['remarkPlugins'] = [
@@ -119,11 +112,7 @@ export default function mdx(mdxOptions: MdxOptions = {}): AstroIntegration {
...mdxPluginOpts,
rehypePlugins: [
...(mdxPluginOpts.rehypePlugins ?? []),
- () =>
- rehypeApplyFrontmatterExport(
- frontmatter,
- mdxOptions.frontmatterOptions?.name
- ),
+ () => rehypeApplyFrontmatterExport(frontmatter),
],
});