diff options
author | 2022-08-10 14:43:35 -0500 | |
---|---|---|
committer | 2022-08-10 15:43:35 -0400 | |
commit | 9d5ab55086964fbede17da3d78c209c6d8d13711 (patch) | |
tree | 7a3b12d734f397da45f89e6ab10e7b345b7c9879 | |
parent | a862da8aaebfa087a9e064ce6f8ab2811cdf745b (diff) | |
download | astro-9d5ab55086964fbede17da3d78c209c6d8d13711.tar.gz astro-9d5ab55086964fbede17da3d78c209c6d8d13711.tar.zst astro-9d5ab55086964fbede17da3d78c209c6d8d13711.zip |
[MDX] Astro.props.content -> frontmatter (#4237)
* docs: MDX Astro.props.content -> frontmatter
* chore: changeset
Diffstat (limited to '')
-rw-r--r-- | .changeset/neat-bats-heal.md | 5 | ||||
-rw-r--r-- | packages/integrations/mdx/README.md | 8 |
2 files changed, 9 insertions, 4 deletions
diff --git a/.changeset/neat-bats-heal.md b/.changeset/neat-bats-heal.md new file mode 100644 index 000000000..c816116c5 --- /dev/null +++ b/.changeset/neat-bats-heal.md @@ -0,0 +1,5 @@ +--- +'@astrojs/mdx': patch +--- + +Update "Astro.props.content" -> "Astro.props.frontmatter" in README diff --git a/packages/integrations/mdx/README.md b/packages/integrations/mdx/README.md index cd795c3fb..a77733589 100644 --- a/packages/integrations/mdx/README.md +++ b/packages/integrations/mdx/README.md @@ -195,19 +195,19 @@ title: 'My Blog Post' --- ``` -Then, you can retrieve all other frontmatter properties from your layout via the `content` property, and render your MDX using the default [`<slot />`](https://docs.astro.build/en/core-concepts/astro-components/#slots): +Then, you can retrieve all other frontmatter properties from your layout via the `frontmatter` property, and render your MDX using the default [`<slot />`](https://docs.astro.build/en/core-concepts/astro-components/#slots): ```astro --- // src/layouts/BaseLayout.astro -const { content } = Astro.props; +const { frontmatter } = Astro.props; --- <html> <head> - <title>{content.title}</title> + <title>{frontmatter.title}</title> </head> <body> - <h1>{content.title}</h1> + <h1>{frontmatter.title}</h1> <!-- Rendered MDX will be passed into the default slot. --> <slot /> </body> |