facebook / docusaurus

Easy to maintain open source documentation websites.
https://docusaurus.io
MIT License
54.07k stars 8.1k forks source link

feat(mdx): support recma plugins #10241

Closed slorber closed 1 week ago

slorber commented 1 week ago

Motivation

Fix https://github.com/facebook/docusaurus/issues/10237

MDX supports Recma plugins, and it's useful for some use cases of our community, so let's expose that option.

https://mdxjs.com/packages/mdx/#:~:text=recmaPlugins,-(PluggableList%20from

Test Plan

options unit tests + dogfood test to ensure it's wired properly

Test links

https://deploy-preview-10241--docusaurus-2.netlify.app/tests/docs/doc-without-sidebar/

Using this plugin works: https://github.com/domdomegg/recma-mdx-displayname

image

netlify[bot] commented 1 week ago

[V2]

Name Link
Latest commit 638fbc889597118564c34d1df1f93a1711b2c43d
Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/6675b210bddcdd000872e07e
Deploy Preview https://deploy-preview-10241--docusaurus-2.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 configuration.

github-actions[bot] commented 1 week ago

⚡ī¸ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ đŸŸĸ 92 đŸŸĸ 98 đŸŸĸ 96 đŸŸĸ 100 🟠 88 Report
/docs/installation 🟠 60 đŸŸĸ 96 đŸŸĸ 100 đŸŸĸ 100 🟠 88 Report
/docs/category/getting-started 🟠 75 đŸŸĸ 100 đŸŸĸ 100 đŸŸĸ 90 🟠 88 Report
/blog 🟠 71 đŸŸĸ 100 đŸŸĸ 100 đŸŸĸ 90 🟠 88 Report
/blog/preparing-your-site-for-docusaurus-v3 🟠 65 đŸŸĸ 96 đŸŸĸ 100 đŸŸĸ 100 🟠 88 Report
/blog/tags/release 🟠 71 đŸŸĸ 100 đŸŸĸ 100 đŸŸĸ 90 🟠 88 Report
/blog/tags 🟠 75 đŸŸĸ 100 đŸŸĸ 100 đŸŸĸ 90 🟠 88 Report
github-actions[bot] commented 1 week ago

Size Change: +123 B (+0.01%)

Total Size: 1.85 MB

Filename Size Change
website/.docusaurus/docusaurus.config.mjs 27.2 kB +96 B (+0.35%)
ℹī¸ View Unchanged | Filename | Size | Change | | :--- | :---: | :---: | | `website/.docusaurus/codeTranslations.json` | 2 B | 0 B | | `website/.docusaurus/globalData.json` | 123 kB | 0 B | | `website/.docusaurus/i18n.json` | 930 B | 0 B | | `website/.docusaurus/registry.js` | 304 kB | 0 B | | `website/.docusaurus/routes.js` | 202 kB | 0 B | | `website/.docusaurus/routesChunkNames.json` | 130 kB | 0 B | | `website/.docusaurus/site-metadata.json` | 2.17 kB | 0 B | | `website/build/assets/css/styles.********.css` | 112 kB | 0 B | | `website/build/assets/js/main.********.js` | 906 kB | +27 B (0%) | | `website/build/index.html` | 38.1 kB | 0 B |

compressed-size-action