docs: Add expose-markdown-docusaurus-plugin resource#11623
docs: Add expose-markdown-docusaurus-plugin resource#11623slorber merged 1 commit intofacebook:mainfrom
Conversation
|
Hi @FlyNumber! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
✅ [V2]Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
|
Thanks I'm not sure the implementation will handle many edge cases. An alternative you can try is to use the source file path metadata that our content plugins associate with each route: async postBuild({routes}) {
await Promise.all(
routes.map(async (route) => {
console.log(route.metadata?.sourceFilePath)
}),
);
}, |
|
Thanks for pointing us to route.metadata.sourceFilePath — that was exactly what we needed. We refactored the plugin to pull source paths directly from the postBuild routes prop instead of scanning the filesystem, which also means it now respects custom routeBasePath configs without any hardcoded assumptions. |
|
Hey, FYI I'll likely add a similar plugin to Docusaurus core because we want to provide such a feature to our users and also deploy something similar on our own website. I'll likely post here when I start working on this later. In case it's helpful, here are some references I gathered for myself: |
Pre-flight checklist
Motivation
Test Plan
Test links
Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/
Related issues/PRs