Hello Ladies and Gents,
image I have got this project layout
/
/doc_root
/doc_root/index.rst
/doc_root/_static
/doc_root/_static/header.rst
/doc_root/content
/doc_root/content/file1.rst
/doc_root/content/file2.rst
/doc_root/content/subfolder/file3.rst
/doc_root/content/subfolder/file4.rst
The sphinx build command will run in /doc_root , the _static/header.rst will be included in every content/**/file*.rst.
What I am looking for is a kind of internal variable to be included to _static/header.rst (my desired use-case) or if not possible to all content/**/file*.rst, which would provide the relative path to the source file (the portion after /doc_root/)
So best-case the content of content/file1.rst could look like:
..include:: /_static/header.rst
Lorem...
The _static/header.rst file could look like:
The source file is located in |the_awesome_variable|
The renderer content/file1.rst should look like:
The source file is located in content/file1.rst
Lorem...
How could I achieve this.
Best regards
BJ