Show alternative versions in the CookBook
Summary
Add a version selection menu in the CookBook. See what it looks like here: https://vpoughon.github.io/otb_cookbook_examples/.
Rationale
OTB release are not very frequent, so it's useful to be able to check the latest version of the documentation (develop), or a past version.
Implementation Details
This implementation fetches the develop version of the html div
for all versions. This allows any version to show links to versions released later without rebuilding.
The file Documentation/Cookbook/_static/html/versions.html
contains the list of links and needs to be kept up to date manually.
Once this is merged I will add this step to the how to release wiki:
#### Update version list in CookBook
In the develop branch, update the file `Documentation/Cookbook/_static/html/versions.html` with the new version and link.
In the future it would be nice to also have a warning displayed at the top when viewing an older version of the doc, like for example the sphinxcontrib-versioning doc does that.
Copyright
The copyright owner is CNES and has signed the ORFEO ToolBox Contributor License Agreement.
Check before merging:
- All discussions are resolved
- At least 2
votes from core developers, no vote. - The feature branch is (reasonably) up-to-date with the base branch
- Dashboard is green
- Copyright owner has signed the ORFEO ToolBox Contributor License Agreement
Merge request reports
Activity
added documentation label
There is a hack that will allow to show the new widget in older versions of the CookBook without rebuilding them (at least in the index page):
After this MR is merged, edit
index.html
and add this line before the closing</body>
tag:<script type="text/javascript" src="https://www.orfeo-toolbox.org/CookBook-develop/_static/js/versions.js"></script>
I have no way to test this unfortunately.
Yes, I mention that in the MR description. We can add it to the Update Documentation section I think?
mentioned in commit d9d35e57
mentioned in merge request !441 (merged)
changed milestone to %7.0.0