From 7b3286c1875fb641ed68eed9f1c5282d746abe5c Mon Sep 17 00:00:00 2001 From: LekoArts Date: Fri, 19 Aug 2022 08:56:32 +0200 Subject: [PATCH] chore(docs): Add note about query name to MDX --- docs/docs/how-to/routing/mdx.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/how-to/routing/mdx.md b/docs/docs/how-to/routing/mdx.md index 1bcdfd999236e..5625c45c35290 100644 --- a/docs/docs/how-to/routing/mdx.md +++ b/docs/docs/how-to/routing/mdx.md @@ -319,7 +319,7 @@ For further reading, check out the [createPages](/docs/reference/config-files/ga ### Make a layout template for your posts -You can create a file called `posts.jsx` in `src/templates` - this component will be rendered as the template for all posts. Now, create a component that accepts your compiled MDX content via `children` and uses GraphQL `data` to show the title: +You can create a file called `posts.jsx` in `src/templates` - this component will be rendered as the template for all posts. Now, create a component that accepts your compiled MDX content via `children` and uses GraphQL `data` to show the title. **Please note:** The query must **not** have a name. This way Gatsby can create a unique one internally and the `__contentFilePath` in the next step will work correctly. ```jsx:title=src/templates/posts.jsx import React from "react"