Reputation: 353
When using sphinx-apidoc to generate .rst
files, the output produce does not contain any labels:
dessn.examples package
======================
.. automodule:: dessn.examples
:members:
:undoc-members:
:show-inheritance:
Subpackages
-----------
.. toctree::
dessn.examples.discrete
dessn.examples.simple
What I am trying to do is to link to specific pages from a customised home page, which is not generated using apidoc. However, I cannot find any way to call api-doc and have it generate labels itself, nor can I figure out any proper way of simply linking to the right .rst
without a label, and without simply typing out the absolute html file that I know will generate.
I can use the ::include
statement, and it works just fine, but I have been completely unable to find a statement which will simply generate a hyperlink to the rst file.
Am I missing something obvious here, or do I have to figure out a way to make api-doc insert labels?
Cheers
Upvotes: 5
Views: 2099
Reputation: 353
Following the thread that mzjn linked to, the best solution so far is to first realise a package and a module are equivalent for this question, and that you can use the module python reference, as detailed here on sphinx.
As such, the link to the dessn.examples.simple
package can be achieved by simply inserting the code
:py:mod:`dessn.examples.simple`
Upvotes: 8