The following bits are snipped a few different ways. See links for actual text. I am no reStructuredText expert so hopefully my terms aren't too incorrect, but it seems that while the substitution reference does get processed enough to result in the substitution definition's target being presented as the link, it does not process the definition's image.
https://github.com/altendky/qtrio/blob/eddc9446fda97567dd4e44971ff088bd0380743b/docs/source/README.rst
|documentation badge|
<snip>
.. _documentation: https://qtrio.readthedocs.io
.. |documentation badge| image:: https://img.shields.io/badge/docs-read%20now-blue.svg?color=royalblue&logo=Read-the-Docs&logoColor=whitesmoke
:target: `documentation`_
:alt: Documentation
becomes
https://github.com/altendky/qtrio/blame/eddc9446fda97567dd4e44971ff088bd0380743b/README.rst#L9-L12
`documentation <https://qtrio.readthedocs.io>`_
The full scenario is that I am trying to render my .rst readme including .. literalinclude:: as well as badge images since GitHub won't process literalincludes.
altendky/qtrio#233
.rst result as rendered on GitHub.

.html result as rendered on Read the Docs.

The following bits are snipped a few different ways. See links for actual text. I am no reStructuredText expert so hopefully my terms aren't too incorrect, but it seems that while the substitution reference does get processed enough to result in the substitution definition's target being presented as the link, it does not process the definition's image.
https://github.com/altendky/qtrio/blob/eddc9446fda97567dd4e44971ff088bd0380743b/docs/source/README.rst
becomes
https://github.com/altendky/qtrio/blame/eddc9446fda97567dd4e44971ff088bd0380743b/README.rst#L9-L12
The full scenario is that I am trying to render my
.rstreadme including.. literalinclude::as well as badge images since GitHub won't processliteralincludes.altendky/qtrio#233
.rstresult as rendered on GitHub..htmlresult as rendered on Read the Docs.