SphinxDirective access to config._raw_config data

55 views Asked by At

I need to do something very simple: Access the tag generated by the command line:

$ sphinx-build -t <tag_name>

Example:

$ sphinx-build -t Foo

Will create a dictionary entry in:

sphinx.util.docutils.SphinxDirective.config._raw_config['tags'].tags

also mirrored in:

sphinx.util.docutils.SphinxDirective.env.config._raw_config['tags'].tags

And tags will contain a dictionary with an entry:

'Foo': True

However, accessing SphinxDirective.config._raw_config is asking for a protected member out of scope.

What is the correct method for accessing the Sphinx tags while processing directives?

0

There are 0 answers