yearn-devdocs
yearn-devdocs copied to clipboard
MVP - simpler versioning
~~This pull request is not intended for prod, but is instead~~ an example of how we could simplify the versioning system of the docs website and solve a versioning problem.
Background
The current site uses docusaurus' native versioning for the different release versions of the vault smart contracts. This has worked fine, but is optimized for only one contract upgrade path (i.e. the V2 vaults). With the release of V3 vaults, there are now 2 versioning systems, one for v2 and one for v3, and they do not use the same versioning system. This will need to be solved one way or another.
Proposed Solution
Instead of using the native versioning system from docusaurus, we can instead just use different folders within the docs file directory. This is a manual solution, but not really more work, and it simplifies the complexity of the site. There would be no need for versioned sidebars, no concerns with setting the right version, faster build times (according to docusaurus). It would also allow V2 and V3 versions to live together nicely.
Something like:
Smart Contracts
|---- V3 Current (v3.x.x)
| |--- contract 1
| |--- contract 2
| |--- contract n...
|
|---- V3 Deprecated
| |--- v3.x.x
| | |--- contract 1
| | |--- contract 2
| | |--- contract n...
| |--- v3.x.x
| |--- contract 1
| |--- contract 2
| |--- contract n...
|
|---- V2 Current (v0.4.6)
| |--- contract 1
| |--- contract 2
| |--- contract n...
|
|---- V2 Deprecated
| |--- v0.4.5
| | |--- contract 1
| | |--- contract 2
| | |--- contract n...
| |--- v0.x.x
| |--- contract 1
| |--- contract 2
| |--- contract n...
I updated the site in this pull request to show this structure. ~~This is not ready for prod because all the versioning code is still in the site, I just hid it to show this example. I would have removed the versioning but ran into some errors that I couldn't fix when removing it.~~
To see the changes, go to the vercel preview and click on the Smart Contracts
tab on the top. The files in the V3 section are placeholders since we don't have the vydoc outputs for the new contracts. (I will create an issue for this workflow)