How to reference an *.rst file from the docstring of a module using sphinx -
i wrote little tutorial in rst format. documentation generated apidoc, reference tutorial in docstring using:
:any:`<my_tut>` where my_tut.rst in top level directory of sphinx-documentation source-folder. however, error
warning: 'any' reference target not found: my_tut added info:
the output of apidoc not in toplevel source folder, in subfolder called code.
the :doc: role can used create cross-reference my_tut.rst:
:doc:`my_tut` if link source , link target in different folders, needs taken account. target 1 level above source, this:
:doc:`../my_tut` an alternative add label before relevant heading in my_tut.rst , use cross-reference target. if label definition .. _my_label:, reference this:
:any:`my_label` you use :ref:`my_label`.
Comments
Post a Comment