feat(theme-classic): MDXContent wrapper component#6842
Conversation
|
✔️ [V2] 🔨 Explore the source changes: fa5f707 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/62223d8c8713f700077a7f00 😎 Browse the preview: https://deploy-preview-6842--docusaurus-2.netlify.app |
|
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-6842--docusaurus-2.netlify.app/ |
|
Size Change: +70 B (0%) Total Size: 791 kB
ℹ️ View Unchanged
|
|
@Josh-Cena let me know if that also helps for your use-case reported here: #5468 (comment) |
I also noticed that but I believe it's a devtools bug or something, we only render the component once in the tree. |
|
This component doesn't have access to the front matter, so no. But maybe we can provide the current page's metadata in a wrapping context as well? |
The second |
|
@Josh-Cena see this issue: #6885 This issue + the proposal above should help simplify your setup, and this change looks like a good thing to do anyway, so I'm going to merge for now. |

Motivation
See #5468 (comment)
That's a legitimate use case to have a global way to wrap/enhance any MDX content being rendered
Also helps reduce a bit boilerplate in page/blog/docs
Have you read the Contributing Guidelines on pull requests?
yes
Test Plan
preview