variable into rst include commands

28 views
Skip to first unread message

Miroslav Iliaš

unread,
Nov 6, 2024, 10:43:39 AM11/6/24
to sphinx-users
Dear Sphinx experts,

in many of my rst source files I have inclusion of other (source) files,  like : 

.. include:: ../../../test/xyz_symmetry_recognition/README.rst

Relative paths pointing outside sphinx project directory are not working well.

Is there a way to include a variable, defined in doc/conf.py,  containing the absolute path ?

Something like

.. include:: $DIRACPATH/test/xyz_symmetry_recognition/README.rst

Best,

Miro
Reply all
Reply to author
Forward
0 new messages