I can do this:
For more info, see Target_.
.. _Target: http://google.com
This correctly generates documentation that links Target
to "http://google.com".
I want to replace Target with text that has spaces:
For more info, see Text With Space_.
.. _Text With Space: http://google.com
The above example generates documentation that incorrectly links "Space" to an unknown location. I want it to link "Text With Space" to "http://google.com".
How can I achieve this?
From the Sphinx documentation for Hyperlinks, External links.
Use
Link text <http://example.com/>
_ for inline web links.You can also separate the link and the target definition (ref), like this:
This is a paragraph that contains `a link`_. .. _a link: http://example.com/
You can do this:
.. |Target| replace:: Text With Space
.. _Target: http://google.com
For more info, see |Target|_
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With