You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, 0.2 and 0.1 docs live in the same branch with unique file names and can be distinguished only by virtue of the displayed_sidebar metadata field in each file and the sidebars.js file, which lists the documents for each version via a sidebar navigation list. This creates a challenge for both internal and external authors, as they cannot easily identify which version of Dagger a specific document is associated with. They need to look into and understand the above fields/file to answer this question.
This task is to improve the current versioning system and simplify the above in preparation for the addition of v0.3 docs. The solution should meet the following goals:
not break existing URLs
make it easy to add newer versions in future
enable authors to add new documents for a specific version easily / without detailed Docusaurus understanding
allow some documents to be shared between multiple versions eg. contribution guidelines, community details
have docs coexist in the same repository as the product
Refinement of existing system based on sidebars and immutable page URLs
Details on each one below:
Each version of the docs is rendered at a specific sub-path eg. /0.1, /0.2 etc. Each version contains a physical disk copy of all files related to that version (ie. files shared between two versions will be duplicated on disk). All available versions are built at build-time, although specific versions can be selectively disabled if needed.
Issues:
URLs will break because a v0.2 doc which lives at /xyz today may move to /0.2/xyz when v0.3 is released.
There is no mechanism to share files between versions.
Build overhead as all versions are built, unless explicitly configured not to. This can however be alleviated by using static snapshots of old versions.
Each version of the docs is a separate Docusaurus website.
Issues:
Significant overhead to maintain a separate Docusaurus website for each version. Maintenance of configuration, theming etc will be difficult.
There is no mechanism to share files between versions.
Each website lives at a different URL, therefore current URLs will break.
This approach uses a separate Git branch for each documentation version ie. each branch is an immutable representation of the docs for the corresponding product version. Main branch corresponds to production version of Dagger, all other branches are built and inserted into the Docusaurus site as static snapshots.
Issues:
Creating static snapshots of other branches and inserting them into the main branch is a multi-step process. This process will need to be performed every time changes occur in other doc branches.
If the docs theme changes, older branches will continue to use the old theme, creating some degree of UX dissonance.
For ease of use, this approach ideally requires docs to live in a separate docs repository (this could possibly be worked around with specific repository views)
This continues to use the current system with the following refinements:
Docs are separated into directories, one for each version. Common docs are stored in a common folder and included via each version sidebar.
Document ids in the sidebars.js file are updated to reflect the new version-based directory structure.
To ease creation of new content, over the longer term, the new.sh script can be updated to accept a version number as input. It will use this to create the stub document and sidebar entry in the correct locations and with the correct metadata. In the short-term, README instructions to perform this task manually will suffice.
As discussed with @gerhard today, I propose to move forward with 4 for the following reasons:
Essentially the same system as current, therefore tested and proven to work.
Separating code into version directories will streamline the structure and make it easier to work with for authors.
Activity
vikram-dagger commentedon Oct 11, 2022
I investigated the following approaches:
Details on each one below:
/0.1,/0.2etc. Each version contains a physical disk copy of all files related to that version (ie. files shared between two versions will be duplicated on disk). All available versions are built at build-time, although specific versions can be selectively disabled if needed.Issues:
/xyztoday may move to/0.2/xyzwhen v0.3 is released.Issues:
Issues:
commonfolder and included via each version sidebar.sidebars.jsfile are updated to reflect the new version-based directory structure.new.shscript can be updated to accept a version number as input. It will use this to create the stub document and sidebar entry in the correct locations and with the correct metadata. In the short-term, README instructions to perform this task manually will suffice.As discussed with @gerhard today, I propose to move forward with 4 for the following reasons:
Closes dagger#3318
docs: Move files in version-specific dirs (dagger#3319)