-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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