Skip to content
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

Wrapping MDXComponents not working anymore #6

Open
scubamaggo opened this issue Sep 14, 2022 · 0 comments
Open

Wrapping MDXComponents not working anymore #6

scubamaggo opened this issue Sep 14, 2022 · 0 comments

Comments

@scubamaggo
Copy link

I have noticed that once activating the theme, the extension I have done through wrapping MDXComponents is not picked up anymore.

That is, the example in the original documentation of docusaurus that shows how to extend the component scope via MDXComponent.js is not working correctly anymore.

import React from 'react';
// Import the original mapper
import MDXComponents from '@theme-original/MDXComponents';
import Highlight from '@site/src/components/Highlight';

export default {
  // Re-use the default mapping
  ...MDXComponents,
  // Map the "highlight" tag to our <Highlight /> component!
  // `Highlight` will receive all props that were passed to `highlight` in MDX
  highlight: Highlight,
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant