I am using Python Sphinx (via ReadTheDocs).
I have a repository which contains a few sub-modules, and I'm trying to create a unified documentation, but still keep the the docs assets in each module separately.
My folder hierarchy is:
MyProject
docs
index.rst
module_1_link.rst
_static
<more irrelevant assets...>
module_1
docs
README.rst
_static
myimage.png
The index.rst file looks like this:
.. toctree::
:caption: Module1
module_1_link
The file module_1_link.rst just contains a link to the README file of module 1:
.. include:: ../module1/docs/README.rst
And the README.rst of module 1 references the image:
.. image:: _static/myimage.jpg
When I look at the README file of module 1 (inside GitHub) - myimage.png is shown perfectly.
But, when I run the documentation via sphinx I get:
WARNING: image file not readable: _static/myimage.jpg
I can't find a way to reference the same image from both the README file and the index file rendered by sphinx and see it in both places.