Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const {
getExcludedCollections,
isFullSiteBuild,
} = require("./src/utils/build-collections");
const rehypeFixDomNesting = require("./rehype-fix-dom-nesting");

const isDevelopment = process.env.NODE_ENV === "development";
const isProduction = process.env.NODE_ENV === "production";
Expand Down Expand Up @@ -513,6 +514,11 @@ module.exports = {
options: {
extensions: [".mdx", ".md"],
gatsbyRemarkPlugins: [],
mdxOptions: {
// Keeps MDX from emitting block-level content inside <p>, which the
// browser's parser re-shapes and React then fails to hydrate.
rehypePlugins: [rehypeFixDomNesting],
},
},
},
{
Expand Down
Loading
Loading