docusaurus icon indicating copy to clipboard operation
docusaurus copied to clipboard

feat(content-docs): versionedDocsPath config for docs plugin

Open maxhr opened this issue 3 years ago β€’ 3 comments

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

maxhr avatar Sep 09 '22 14:09 maxhr

[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...

QR Code

Use your smartphone camera to open QR code link.

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

netlify[bot] avatar Sep 09 '22 15:09 netlify[bot]

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!

Josh-Cena avatar Sep 09 '22 15:09 Josh-Cena

⚑️ 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

github-actions[bot] avatar Sep 09 '22 15:09 github-actions[bot]

@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.

Jersyfi avatar Feb 27 '23 15:02 Jersyfi

@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 avatar Mar 02 '23 14:03 slorber

@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.

Jersyfi avatar Mar 02 '23 22:03 Jersyfi