Skip to content

Investigate Best Approach for Documentation Versioning in Quarto #225

@dweng0

Description

@dweng0

We need to establish the best method for versioning our documentation. One potential solution that I have been reviewing with @cmjc and @szemate is to leverage Git tags to determine the specific version of the generated code.

Proposed Approach:

Tag-based Versioning:

By using Git tags, we can automatically determine the version of the code being generated. @szemate recommends a script that runs git describe --tags as a good approach. These versions can then be reflected in the documentation. An alternative to tag based versioning would be to use the release/ tree to get the versions. However this would not show -all- versions (when comparing the tags with the release/ branches there are a lot more release tags). And so may not be what we want.

Quarto YAML File Update:

Using the data obtained from the tags (how?), we could generate a version-switching menu that would be placed in the header of the documentation site. This would allow users to easily navigate between different versions of the documentation.

We can modify the Quarto YAML file to include a drop-down list, allowing users to select the desired version of the documentation. This drop-down would display all available versions based on the tags. Example:
image
This above example is modified from the quarto site here
Which can be done by updating the _quarto.yml file with:

      - text: "Versions"
        menu:
          - text: "1.0.1"
            href: "path/to/1.0.1"
          - text: "1.0.2"
            href: "path/to/1.0.2"
          - text: "1.0.3"
            href: path/to/1.0.3

Versioning Through Folders:

The generated documentation could then be generated per version folder. For example, we could have a structure like contracts/v1.0.1/, contracts/v1.0.2/, contracts/v1/0/3 and so on. This would allow the version dropdown to "marry up" with the available versions based on the folder structure. There would be no technical debt with this approach as the code will be auto generated.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesttriageNeeds prioritisation and/or scheduling

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions