rstgen.sphinxconf.refstothis

A Sphinx extension that adds the refstothis directive.

Thanks to Tomasz Czyż who inspired me to write this. His sphinxcontrib-taglist module uses a different approach, based on the idea that every “reference” to a tag also specifies a text to appear in the list of references. refstothis is for people who don’t want to specify their own text for each tag directive.

TODO:

  • When I do inv clean followed by inv bd, then e.g. the refstothis in Baz does not mention all other documents. But when I then touch the baz.rst file and run inv bd, then they are all there. I guess this is because not all documents have been loaded when the rst is being generated.

Functions

py2rst(x)

setup(app)

Classes

RefsToThis(name, arguments, options, ...)

Implements the rst:dir:refstothis directive.

class rstgen.sphinxconf.refstothis.RefsToThis(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)

Bases: InsertInputDirective

Implements the rst:dir:refstothis directive.