In Sphinx, can I register a bunch of keywords that should always be translated into links?

Posted by Ross Rogers on Stack Overflow See other posts from Stack Overflow or by Ross Rogers
Published on 2010-03-18T18:20:29Z Indexed on 2010/03/18 19:11 UTC
Read the original article Hit count: 301

Filed under:
|

My doc strings have references to other python classes that I've defined. Every time Sphinx encounters one of these classes, I want it to insert a link to the documentation for that other class. Is this possible in Sphinx?

Specifically, I have a doc string like:

'''This class contains a bunch of Foo objects'''

I could write:

'''This class contains a bunch of :class:`~foo.Foo` objects'''

but I would prefer that Sphinx finds all text matching Foo and makes it seem as though I had typed :class:~foo.Foo

© Stack Overflow or respective owner

Related posts about sphinx

Related posts about python