Skip to content

Enhance Hugo doc process to handle and preserve multiple versions of past docs (readme and typedoc files) #731

Open
@jeromy-cannon

Description

@jeromy-cannon

👾 Description of the issue

Solo's current GitHub Pages generated by Hugo only support a single version which is latest. We wish to be able to default to latest but to have the option of selecting previous versions of the doc somewhere on the landing page and to retain these versions of the docs. The docs are to include the main pages as well as the classes files generated by TypeDoc.

Proposed Solution:

  1. https://solo.hiero.org/ should redirect to https://solo.hiero.org/latest
  2. there should be a dropdown selector that has latest selected that will contain a list of previous versions of the documentation, understanding that previous version prior to our next release may not be available [NOTE: we wish to go back through previous versions of docs as much as possible, definitely v0.35.2]
  3. the version dropdown should be under the Search text box and above the Navigation menu
  4. changing the dropdown to a previous version should change the documentation page to the version selected and all of links on that page and child pages should work correctly
  5. prior versions of the docs should be captures as GitHub a release artifact
  6. latest should match the npmjs latest of @hashgraph/solo
  7. a main dropdown should exist and have the latest version of docs for the last merge to main branch
  8. the main version of the docs will need to be built each time since creating a patch to a release would only grab the release artifacts, and main does not have a release artifact, so the patch doc publish would also need to rebuild the doc for the main branch prior to publishing the site which contains all of the versions

TODO:

  • configure Hugo for versioning
  • add version dropdown to the sidebar
  • build version menu dynamically
  • display the current version in the header
  • each version of documentation needs to capture its version in an _index.md
  • determine the version with the latest tag on npmjs
  • copy the docs from the latest version from its version of the docs into the latest folder of the doc site we are building
  • when creating a release do a Hugo build, tar/zip and upload as an artifact
  • download all of the prior docs that are published as release artifacts and put them into their proper directories for the site we are building
  • deploy site to github pages
  • ensure that the redirects to latest are working correctly
  • ensure links are working correctly

Metadata

Metadata

Assignees

Labels

P0An issue impacting production environments or impacting multiple releases or multiple individuals.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions