-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display actual version number (possibly a new feature request) #4529
Comments
I'm attaching an image to be clear We only set the version value when there isn't a conf.py file https://github.com/rtfd/readthedocs.org/blob/79032b53b0aa75bce4d4a522c7f4771db730aa6c/readthedocs/templates/sphinx/conf.py.conf#L18 But we always force to use the value from when the docs are on rtd |
On the other hand, I think this could apply to |
I agree that it makes perfect sense to include the version number in As for Ideally there should be configurable option(s) for controlling the identifier associated to the I agree that the reasonable default for such option(s) would be to include the version number in |
We can use But, this would mean that we will lose the
Meanwhile, other themes will have the floating footer saying Personally I kind of like the |
I'm not really sure that we want to change the default behavior here without making it configurable since it will affect to all our users suddenly. For anyone interesting on using a custom Please, let us know. If we agree on this, we can probably close the issue. @stsewd thoughts? |
Yes, "all" I was asking for was some configuration option. I agree changing the default would be too disruptive. That said, I don't fully understand the proposed solution. If I wanted to override the strings "stable" and "latest" to show additional information (wherever they appear on the web page, regardless of the chosen theme), what exactly should I write in my E.g., would it be the case that if I just set |
Is there any progress here? I opened an issue in some specific project (nextstrain/augur#817) only to later notice that there's this upstream issue, apparently still open. For anyone coming here, SciTools/iris discussed different workarounds here: SciTools/iris#3992 and settled on this one: SciTools/iris#4030 |
I posted this on stack overflow https://stackoverflow.com/questions/51840964/showing-the-version-number but got no answers.
TL;DR:
How do I make read-the-docs show the actual version number instead of the word "latest" or "stable" in the top-left of the documentation pages?
For the best of both worlds, it should say something like "latest v0.1.2".
Details:
I have a Python project, and I publish the documentation on read-the-docs. I'm using also using the
sphinx_rtd_theme
with nohtml_theme_options
.In my sphinx
conf.py
, I have:When I locally build the documentation, I see the version number displayed in the top-left, under the project name, as expected.
But when I look at the read-the-docs documentation, this version number is replaced with "latest".
It is great to know that the documentation is of the latest version! But it would be even better to know which version is documented.
It seems this is the expected default behavior. E.g. look at https://twine.readthedocs.io/en/latest/ - there are two versions available,
latest
andstable
, but there's no (easy) way to tell what the actual version numbers are for either one.It it matters: My version number is different for every commit. It is in a well-behaved
x.y.z
format, and is stored in an explicitversion.py
file. This file is part of thesdist
package but is never checked in; instead it is generated bysetup.py
from the version control system. The latest tag is thex.y
, and the distance-in-commits-from-tag-on-main-branch is thez
.The text was updated successfully, but these errors were encountered: