On 06/24/2010 08:45 PM, Evgeny wrote:
Hello, is there a way to reuse hyperlinks in the sphinx system? i.e -
avoid copy-pasting urls from file to file?
for example I would like to have external links entered like so:
`some link text<name_for_url>`_
and in some other file:
.. _name_for_url: http://example.com/
You can use the rst_epilog setting in your conf.py to specify targets
and substitutions across all of your documents. (You wouldn't need
substitutions, that looks like a valid target example to me.) The value
of that setting is simply appended to all of your reST files.
(You could also create a separate file for it and use something like
``rst_epilog = file('myepilog.rst').read()`` in your conf.py. Also, if
have more than one set of includes, instead of rst_epilog you could also
manually use reST's .. include:: directive.)
If there are a lot of similar external links you may also want to
consider a custom role (such as :rfc:`822` might be used for RFC
documents) or even a missing reference fallback. If the external links
lead to other Sphinx documentation sites, you should look into the
intersphinx extension.
--
--Max Battcher--
http://worldmaker.net
--
You received this message because you are subscribed to the Google Groups
"sphinx-dev" group.
To post to this group, send email to sphinx-...@googlegroups.com.
To unsubscribe from this group, send email to
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sphinx-dev?hl=en.