Welcome to sphinx-xml2rfc’s documentation¶
sphinx-xml2rfc¶
A sphinx extension providing features to document work-in-progress
Internet-Drafts using git history.
Overview¶
The extension contains two primary components:
Versioned document generation¶
Hooks sphinx-build initialisation, and searches the local git repository
for refs, and uses xml2rfc to build each version of the named drafts.
These are written to the sphinx source directory tree for use during the
build phase.
sphinx language domain¶
The xml2rfc domain provides directives for rendering Internet-Draft texts
and for displaying changes between versions.
Documentation sources containing the appropriate directives can optionally be
auto-generated, after the fashion of sphinx-apidoc
Installation¶
python -m pip install sphinx-xml2rfc
Usage¶
To use, add sphinx_xml2rfc to extensions in conf.py:
extensions = [
...,
sphinx_xml2rfc,
...
]
The following configuration options are available:
xml2rfc_draftsIterable of draft names for which to auto-generate text versions from xml sources using
xml2rfc.Each name should match the name of the XML source file (without the
.xmlextension) in the root of the repository tree.default:
[]xml2rfc_sourcesIterable of file names required by
xml2rfcto process the documents inxml2rfc_drafts.default:
[]xml2rfc_remotesIterable of git remote names to consider when searching for branch
refs.Local
headswill be considered first, after which each remote will be searched in order. Only the first branchrefwith a given name will be used.default:
["origin"]xml2rfc_autogen_docsEnable the automatic generation of
sphinxsource documents.default:
Truexml2rfc_autogen_branch_reRegex pattern for selection of branch names to generate document versions for.
default:
r"^main|master$"xml2rfc_autogen_tag_reRegex pattern for selection of tag names to generate document versions for.
default:
r"^.+$"xml2rfc_outputDirectory name in which to output files. Relative to
sphinxconfdir.default:
"_xml2rfc"