feat(content-docs): versionedDocsPath config for docs plugin
Pre-flight checklist
- [x] I have read the Contributing Guidelines on pull requests.
- [x] If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
- [x] If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.
Motivation
Addresses #8061 where you can configure a directory to write the versions to when running docusaurus docs:version.
A new parameter in content-docs plugin config versionedDocsPath, by default it's undefined and we use the current behavior and write versions to site dir.
It supports one versionedDocsPath per plugin instance, but not dirs per-version as described in the issue.
Test Plan
Added unit tests for new configuration.
Test links
Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/
Related issues/PRs
[V2]
Built without sensitive environment variables
| Name | Link |
|---|---|
| Latest commit | cb35a1a99a078dd3feab2282d6f94a3d82a65ac7 |
| Latest deploy log | https://app.netlify.com/sites/docusaurus-2/deploys/631b546ce196ab000881c7cd |
| Deploy Preview | https://deploy-preview-8076--docusaurus-2.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
Wow, that's a big one (I know, probably a lot of test files). I'm quite busy these days and will be slow at getting to it, while @slorber is on holiday till the end of this month (and he needs to be the one to approve new public API surface). Sorry if we are slow to reviewβwe will eventually give feedback!
β‘οΈ Lighthouse report for the deploy preview of this PR
| URL | Performance | Accessibility | Best Practices | SEO | PWA | Report |
|---|---|---|---|---|---|---|
| / | π 74 | π’ 98 | π’ 100 | π’ 100 | π 80 | Report |
| /docs/installation | π 79 | π’ 100 | π’ 100 | π’ 100 | π’ 90 | Report |
@maxhr @slorber is any help needed here to get progress on this PR? I need this feature to proceed with my documentation because I have several frameworks with different versioning which looks messy if they aren't in a single folder.
@maxhr @slorber is any help needed here to get progress on this PR? I need this feature to proceed with my documentation because I have several frameworks with different versioning which looks messy if they aren't in a single folder.
I left a review that wasn't handled yet and should focus on other PRs (notable MDX2 upgrade).
If @maxhr doesn't want to finish this PR, you can probably fork his branch (so that @maxhr remains credited for his work), continue the work, handle my review, and open a new PR that I can review.
@slorber i will take a close look at this PR if it makes sense for me to fork it. Otherwise i will request my own PR.