I have a package documented on ReadTheDocs. I want to include the release notes for the newest release of my software both on the landing page and the dedicated release notes page (with the older versions’ notes)
Therefore I have my release-new.rst
:
Version 0.7.4
=============
…
Version 0.7.3
=============
…
and .. include::
it both in index.rst
and release-notes.rst
.
The problem arises when I want to add reference targets:
.. _v0.7.4:
Version 0.7.4
=============
…
The code for this target obviously gets included in both files, which means that docutils correctly complains about a duplicate reference target.
How can I include the file twice, but only have the reference targets in one of the documents? Is there a custom include
directive alternative or a different way to define my reference?