Stx docs version menu
We are having issues with the version/branch menu on the starlingx docs site. From a release branch, e.g docs.starlingx.com/r/stx.6.0 trying to switch to another release branch append the "r/stx.<version>/" to the current URL instead of pointing to https://docs.starlingx.io/r/stx.<version<https://docs.starlingx.io/r/stx.%3cversion>>. i.e. docs.starlingx.com/r/stx.6.0/r/stx.7.0 is constructed instead of the correct docs.starlingx.com/r/stx.7.0. The settings in the corresponding Sphinx conf.py file are: starlingxdocs_plus_this_version = "r/stx.6.0" starlingxdocs_plus_other_versions = [("Version 7.0","r/stx.7.0"),("Version 8.0","r/stx.8.0"),("Latest","/")] Can we confirm if these conf.py settings are correct? If they are, then we will open a bug against the template. Thanks
On 2023-03-06 17:12:15 +0000 (+0000), Stone, Ronald wrote:
We are having issues with the version/branch menu on the starlingx docs site.
From a release branch, e.g docs.starlingx.com/r/stx.6.0 trying to switch to another release branch append the "r/stx.<version>/" to the current URL instead of pointing to https://docs.starlingx.io/r/stx.<version>. i.e. docs.starlingx.com/r/stx.6.0/r/stx.7.0 is constructed instead of the correct docs.starlingx.com/r/stx.7.0. [...]
Starting from first principles, have a look at the page source for https://docs.starlingx.io/r/stx.8.0/ and you'll see in the div with class="version-dropdown-content" the hrefs are all relative (no leading "/" in them). I would try adding a leading "/" to the second string in each tuple within that starlingxdocs_plus_other_versions list in your doc/source/conf.py file and see if that solves the issue. Alternatively, you could adjust doc/source/_themes/starlingxdocs_plus/titlerow.html to prepend a "/" in the href="{{pathto(ver[1], 1) }}" instead like href="/{{pathto(ver[1], 1) }}" which would make it always absolute. -- Jeremy Stanley
The entries in the menu in the screenshot are incomplete (only 2 entries) and the one for "Install Guides" points to docs.starlingx.com, not to specific guide. They also point to the docs from master regardless of which release is selected from the VERSION drop down. How can we either suppress it or configure it to have complete entries pointing to the correct targets? Thanks [Graphical user interface, application Description automatically generated]
participants (2)
-
Jeremy Stanley
-
Stone, Ronald