Discussion:
[Docutils-users] How do I put the project's version number in a hyperlink in the documentation
Bert IJff
2014-02-05 10:20:44 UTC
Permalink
In my project's documentation I want to refer to 3 downloadable files by
using hyperlinks.
I found that I can specify the project's version number in the conf.py file,
e.g.:
version = '1.3.2'

Then I use |version| as a placeholder for the version number in the
documentation e.g.
#. Download http://www.domain.eu/download/part1-|version|.tar.gz and
$ sudo easy_install http://www.domain.eu/download/part2-|version|.tar.gz
http://www.domain.eu/download/part3-|version|.tar.gz.

Now the |version| part is replaced by the 1.3.2 but the hyperlink's href
only contains the part on the left side of |version|.

How can I make the "|version|.tar.gz" part be included in the hyperlink's href?

Thanks for your help.
David Goodger
2014-02-05 15:15:29 UTC
Permalink
That version substitution must be a Sphinx feature. It isn't part of
Docutils itself.

As for interpolating the version number into a hyperlink, I don't
think it's possible, sorry. But try on the Sphinx mailing list, maybe
they can help.
--
David Goodger <http://python.net/~goodger>
Post by Bert IJff
In my project's documentation I want to refer to 3 downloadable files by
using hyperlinks.
I found that I can specify the project's version number in the conf.py file,
version = '1.3.2'
Then I use |version| as a placeholder for the version number in the
documentation e.g.
#. Download http://www.domain.eu/download/part1-|version|.tar.gz and
$ sudo easy_install http://www.domain.eu/download/part2-|version|.tar.gz
http://www.domain.eu/download/part3-|version|.tar.gz.
Now the |version| part is replaced by the 1.3.2 but the hyperlink's href
only contains the part on the left side of |version|.
How can I make the "|version|.tar.gz" part be included in the hyperlink's href?
Thanks for your help.
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Docutils-users mailing list
https://lists.sourceforge.net/lists/listinfo/docutils-users
Please use "Reply All" to reply to the list.
Bert IJff
2014-02-05 15:19:45 UTC
Permalink
Post by David Goodger
That version substitution must be a Sphinx feature. It isn't part of
Docutils itself.
As for interpolating the version number into a hyperlink, I don't
think it's possible, sorry. But try on the Sphinx mailing list, maybe
they can help.
Good suggestion, David. Thanks, I'll give it a try.

Loading...