ChristopherBiscardi / gatsby-mdx

Gatsby+MDX • Transformers, CMS UI Extensions, and Ecosystem Components for ambitious projects
https://gatsby-mdx.netlify.com/
715 stars 100 forks source link

[1.0] defaultLayouts needs to become defaultWrappers #375

Closed ChristopherBiscardi closed 5 years ago

ChristopherBiscardi commented 5 years ago

MDX 1.0 unified layouts and wrappers to be wrappers.

polarathene commented 5 years ago

When using defaultLayout, I imported MDX content into a MDX document, afaik this type of embedding is meant to be a feature but I'm not sure why you'd want to apply the layout to these embeds?

As a result console spat out a bunch of errors about elements like header and footer being in

tags, and sure enough the embedded MDX document had also embedded the header and footer from the layout.

If the purpose of setting a default layout is to not need to handle it explicitly within the MDX doc itself, do you need to accept this tradeoff with embeds?

ChristopherBiscardi commented 5 years ago

@polarathene You need to make a new issue. This issue is unrelated to what you're asking.

ChristopherBiscardi commented 5 years ago

moved to https://github.com/gatsbyjs/gatsby/issues/16848