Reputation: 8699
I have a lot of Sphinx pages which have the same links on them. Like those:
.. _CC-BY: https://creativecommons.org/licenses/by/3.0/
.. _MIT: http://opensource.org/licenses/MIT
Currently, I have those two lines in every file that has a MIT_
in it. Is it possible to have a central file in the project where I can put those link targets? That way, I could write MIT_
anywhere and it would link to that.
Upvotes: 5
Views: 439
Reputation: 50947
Put your link definitions in rst_epilog in conf.py:
rst_epilog = """
.. _CC-BY: https://creativecommons.org/licenses/by/3.0/
.. _MIT: http://opensource.org/licenses/MIT
"""
Upvotes: 11