RFC: version archiving cli + docs version page #3286
Labels
apprentice
Issues that are good candidates to be handled by a Docusaurus apprentice / trainee
feature
This is not a bug or issue with Docusausus, per se. It is a feature request for the future.
💥 Proposal
A Docusaurus 2 site can grow over time mostly due to:
At the same time, we are a React SPA and the build times are impacted by the number of pages to build.
Some users who have lots pages will likely want to improve the build time, and "archive" older versions, as no contributions are being made to these versions anymore, so it's not worth it to keep them in the SPA part of Docusaurus.
What I'd like is to have a
docusaurus archive --version 1.0.0
cli that:Then I wonder if we couldn't add the deployment link to some config object (
versions.json
) and make the docs plugin create automatically a page with all the versions available. We'd link to this page as an item of the version dropdown.On Docusaurus we have this page, but it's created manually: https://v2.docusaurus.io/versions
Also we don't archive versions so if you really want to read docs
2.0.0-alpha.53
you'd have to build form sources the site locally on the correct git tag, not very convenient.I wonder if we shouldn't make
versions.json
an object instead of an array (we could support both for retrocompatibility):Does it make any sense?
Note, we need to keep this in a simple json file because we can manipulate a json file programmatically. That wouldn't be so easy if it we needed to append a version somewhere in a regular js file.
Note, when building to a standalone site, the versionsDropdown could become automatically a regular button, and we'd note include any other version in this standalone site.
Also worth considering the scenario where the user is using 2 instances of the docs plugin (like /ios and /android) and he wants to archive for example Android version 3: can we filter out all iOS related docs of this archived site?
The text was updated successfully, but these errors were encountered: