From 9d5ab55086964fbede17da3d78c209c6d8d13711 Mon Sep 17 00:00:00 2001 From: Ben Holmes Date: Wed, 10 Aug 2022 14:43:35 -0500 Subject: [PATCH] [MDX] Astro.props.content -> frontmatter (#4237) * docs: MDX Astro.props.content -> frontmatter * chore: changeset --- .changeset/neat-bats-heal.md | 5 +++++ packages/integrations/mdx/README.md | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 .changeset/neat-bats-heal.md diff --git a/.changeset/neat-bats-heal.md b/.changeset/neat-bats-heal.md new file mode 100644 index 0000000000..c816116c57 --- /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 cd795c3fb2..a77733589b 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 [``](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 [``](https://docs.astro.build/en/core-concepts/astro-components/#slots): ```astro --- // src/layouts/BaseLayout.astro -const { content } = Astro.props; +const { frontmatter } = Astro.props; --- - {content.title} + {frontmatter.title} -

{content.title}

+

{frontmatter.title}