Set up multi-version docs #633
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
What is this PR
Why is this PR needed?
To be able to view multiple versions of the docs, including for past versions.
What does this PR do?
deploy_sphinx_docs_multiversionaction instead ofdeploy_sphinx-docsconf.pyThis new setup:
v0.5.1),main(without a tag) to a specialdevfolderdev.latestto the most recent releaseAs a side effect of how the
doc_versionfor the dropdown is derived, the release name (displayed on the top left next to the logo) will now be parsed asdatashuttle v{MAJOR}.{MINOR}.{PATCH}.dev{N}instead of justdatashuttle v{MAJOR}.{MINOR}.{PATCH}. However this will only affect "dev" versions. The "latest" version (shown by default) will be displayed asdatashuttle v{MAJOR}.{MINOR}.{PATCH}, same as any other tagged release version.References
The 2
movementPRs that this one is based on:Relevant issues/PRs of the actions repo:
MAJOR.MINORversions actions#118How has this PR been tested?
This has been successfully tested on the movement and NeuroBlueprint websites.
To observe the full effects of this change, we need to make a new release after merging this PR, and I recommend doing this soon after merging.
After we are happy with the changes, we can also clean up the old contents of
gh-pages, i.e. delete all root contents other than:index.html.nojekyllCNAMEdevandv{MAJOR}.{MINOR}.{PATCH}.Is this a breaking change?
No.
https://datashuttle.neuroinformatics.dev will still resolve to the homepage because of the aforementioned aliasing and redirection.
Any links to specific pages, e.g. https://datashuttle.neuroinformatics.dev/pages/get_started, will break, as the new links will become https://ethology.neuroinformatics.dev/latest/pages/get_started. Luckily I found only 2 such links in the entire project (both in the README).
Does this PR require an update to the documentation?
No.
Checklist:
The code has been tested locallyTests have been added to cover all new functionalityThe documentation has been updated to reflect any changes