summaryrefslogtreecommitdiff
path: root/packages/integrations/mdx/README.md
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/README.md
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/README.md')
-rw-r--r--packages/integrations/mdx/README.md29
1 files changed, 1 insertions, 28 deletions
diff --git a/packages/integrations/mdx/README.md b/packages/integrations/mdx/README.md
index d4ad1f39d..d7d27d039 100644
--- a/packages/integrations/mdx/README.md
+++ b/packages/integrations/mdx/README.md
@@ -121,7 +121,7 @@ A function that returns an array of all headings (i.e. `h1 -> h6` elements) in t
### Frontmatter
-Astro also supports YAML-based frontmatter out-of-the-box. By default, all variables declared in a frontmatter fence (`---`) will be accessible via the `frontmatter` export. See the `frontmatterOptions` configuration to customize this behavior.
+Astro also supports YAML-based frontmatter out-of-the-box. By default, all variables declared in a frontmatter fence (`---`) will be accessible via the `frontmatter` export.
For example, we can add a `title` and `publishDate` to an MDX page or component like so:
@@ -342,33 +342,6 @@ export default {
}
```
-### frontmatterOptions
-
-**Default:** `'frontmatter'`
-
-We parse all [YAML](https://yaml.org/) frontmatter found in code fences `---` to a named export. This is `frontmatter` by default, but can be customized using `frontmatterOptions.name`.
-
-For example, say you want to access frontmatter as root-level variables without a nested `frontmatter` object. You can override the [`name` configuration option](https://github.com/remcohaszing/remark-mdx-frontmatter#name) like so:
-
-```js
-// astro.config.mjs
-export default {
- integrations: [mdx({
- frontmatterOptions: {
- name: '',
- }
- })],
-}
-```
-
-```mdx
----
-title: I'm just a variable now!
----
-
-# {title}
-```
-
## Examples
- The [Astro MDX example](https://github.com/withastro/astro/tree/latest/examples/with-mdx) shows how to use MDX files in your Astro project.