-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
I was quite confused why an endpoint that was documented to exist for my podman version returned a 404. Only afterwards I realized that I was still looking at the "latest" API docs because the Read the Docs version selector does not affect which API version is being viewed. Read the docs even shows a popover on page load "This may be an old version of this documentation" which further leads you to believe that you're viewing an older version.
URL: https://docs.podman.io/en/latest/_static/api.html

While Read the Docs automatically injects the version selector, I think we could hide it by adding the following CSS to api.html
:
readthedocs-flyout {
display: none;
}
I think this would help but you might still be confused because the version in the URL does not necessarily correspond to the viewed version.
Reference.rst currently links specific versions via a custom ?version
URL parameter that is then recognized in api.html:
podman/docs/source/_static/api.html
Line 26 in d5b5710
if (query.has("version")) { |
I think the best solution would be to introduce a custom version selector in api.html (just a simple <select>
) in addition to hiding the Read the Docs version selector. This could still recognize the version
URL parameter and ideally also update the tab title to include the version. What do you think?