I am using sphinx and I would like to show the version of my project from conf.py on my main page for documentation.
Asked
Active
Viewed 1,771 times
2 Answers
5
You can use
:Version: |version|
in your rst

kaosar
- 141
- 11
-
it only shows the version you put in the sphinx `conf.py` file, have a look at https://stackoverflow.com/questions/26141851/let-sphinx-use-version-from-setup-py to know how to do it an automated way – lehalle Aug 31 '23 at 10:26
0
I actually never use Python Sphinx, but I remember seeing a similar question on SO. After searching through, I found the Q+A here
So you could output the config value directly into your index.rst master doc.

user1252280
- 373
- 1
- 7
- 23
-
I tried that but it didnt seem to show on generated HTML page. I am using forked version of read the docs theme. I instead found a different method and much more simpler. I just use `:Version: |version|` in my rst. – kaosar Jun 13 '16 at 22:48