cool-easter-32542
11/02/2023, 1:56 AMmain
main will always contain the support files and "evergreen" pages (list of maintainers, sponsorship info, etc...).
Additionally, it will contain the docs for the version main represents.
release branches
Release branches will have the docs included and some (namely release branches made after this switch) will include now-obsolete support files and "evergreen" pages.
Local builds
Anyone will be able to run npm start in the docs directory to run a local hot-reloading version of the docs site.
Versioning
We can choose between docs-host-versioning and tool-versioning. In order to support "evergreen" pages, and cohesive UI/UX for version selection, the tool-versioning seems most attractive.
(Here's Docusaurus' docs: https://docusaurus.io/docs/versioning)
Note that the tool doesn't fit our use-case well. Each copy of the versioned docs has to live in the same tree. That would mean naively, all versions of our docs would live on main.
Therefore, instead we'd need a "build" process when publishing the full docs that would look something like:
1. checkout main
2. version it accordingly
3. checkout the relevant subtree of main~1 into the docs dir
4. version it accordingly
5. ... rinse and repeat back to v2.0
Reference docs
The "reference" docs are generated from running help-all in the Pants repo with a specified set of plugins enabled. That means the above process will need sub-steps to run pants help-all to first generate the reference docs for that branch, then version and move on.
Blog
Docusaurus supports having a blog, so the plan is to port it because it's feeding two birds with one scone.
pantsbuild/pants