-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Closed
Labels
topic: remark/mdxRelated to Markdown, remark & MDX ecosystemRelated to Markdown, remark & MDX ecosystemtype: bugAn issue or pull request relating to a bug in GatsbyAn issue or pull request relating to a bug in Gatsby
Description
Preliminary Checks
- This issue is not a duplicate. Before opening a new issue, please search existing issues: https://github.com/gatsbyjs/gatsby/issues
- This issue is not a question, feature request, RFC, or anything other than a bug report directly related to Gatsby. Please post those things in GitHub Discussions: https://github.com/gatsbyjs/gatsby/discussions
Description
After upgrading from [email protected] to [email protected], we're seeing our Frontmatter code show up in the content of the page 😱
This appears regardless of whether we have the JSFrontmatterEngine set to true or unconfigured...
cc @pieh @GeeWizWow
Workaround
A solution for gatsby build (SSG) requires reverting the change made by @pieh in #35830:
- Commenting out passing all options to
gray-matterin themdx-loader.js,utils/mdx.js,utils/gen-mdx.jsfiles (usingpatch-package) - And then ALSO enabling the
JSFrontmatterEngineoption
Super strange, wonder what's causing this Frontmatter to show up in the content.
Reproduction Link
https//.com/karlhorky/gatsby-mdx-frontmatter-bug
Steps to Reproduce
- Upgrade existing project from
[email protected]to[email protected] - Run
gatsby developorgatsby build - Observe Frontmatter in the page content
Expected Result
No Frontmatter in the page content
Actual Result
Frontmatter displayed in the page content
Environment
System:
OS: macOS 12.4
CPU: (8) arm64 Apple M1
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.11.0 - /var/folders/sw/v93sywxs2g1bcsr6ln488qfh0000gn/T/yarn--1654793941511-0.7489250249814705/node
Yarn: 1.22.19 - /var/folders/sw/v93sywxs2g1bcsr6ln488qfh0000gn/T/yarn--1654793941511-0.7489250249814705/yarn
npm: 8.7.0 - ~/.nvm/versions/node/v16.11.0/bin/npm
Browsers:
Chrome: 102.0.5005.61
Firefox: 99.0.1
Safari: 15.5Config Flags
No response
GeeWizWow
Metadata
Metadata
Assignees
Labels
topic: remark/mdxRelated to Markdown, remark & MDX ecosystemRelated to Markdown, remark & MDX ecosystemtype: bugAn issue or pull request relating to a bug in GatsbyAn issue or pull request relating to a bug in Gatsby
