On Tue, Aug 11, 2020, 12:02 AM BJ <[email protected]> wrote:
> 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 > > -- > You received this message because you are subscribed to the Google Groups > "sphinx-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sphinx-users/26305b0a-e576-4fa8-adee-4388a8057a52n%40googlegroups.com > <https://groups.google.com/d/msgid/sphinx-users/26305b0a-e576-4fa8-adee-4388a8057a52n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "sphinx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/CAELGjd-f4%3DcFi%2Bbf7_vqycwwD9x-1c%3DrFexHxBCwov2-wxiBrg%40mail.gmail.com.
