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

fix: compatability with docusaurus 2.2.0 #223

Merged

Conversation

sean-perkins
Copy link
Contributor

Adds new property option that was introduced in v2.2.0 of @docusaurus/mdx-loader.

Resolves #222

Related Docusaurus issue: facebook/docusaurus#8298

@netlify
Copy link

netlify bot commented Nov 8, 2022

Deploy Preview for docusaurus-openapi ready!

Name Link
🔨 Latest commit fec287c
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-openapi/deploys/6369c944c37b42000818cad1
😎 Deploy Preview https://deploy-preview-223--docusaurus-openapi.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@sean-perkins
Copy link
Contributor Author

Thanks for the quick review 🙂 note for future context, we could probably update the @docusaurus/types to ^2.2.0 and then deconstruct/pass the markdownConfig from the plugin options to this and fallback to {} if unset.

But this fix unblocks the 2.2.0 support for now until we gather more use cases for that change.

@bourdakos1 bourdakos1 merged commit 9aae0f2 into cloud-annotations:main Nov 8, 2022
@sean-perkins sean-perkins deleted the fix/docusaurus-2.2.0 branch November 8, 2022 03:45
@dabeeeenster
Copy link

Thanks so much!

@@ -274,6 +274,8 @@ export default function pluginOpenAPI(
rehypePlugins,
beforeDefaultRehypePlugins,
beforeDefaultRemarkPlugins,
// Docusaurus 2.2.0 has a regression that requires this option to be set.
markdownConfig: {},
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather pass markdownConfig: context.siteConfig.markdown: this is what all other plugins do, and third-party plugin authors using our mdx loader should rather do the same to apply global markdown config for all md docs. There will be more Markdown site options in the future

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

Successfully merging this pull request may close these issues.

Error when running with Docusaurus v2.2.0
4 participants