Search code examples
pythonpython-sphinxrestructuredtextdocutils

How to programmatically create doctrees in Sphinx?


I'm creating a Sphinx extension that generates a pretty huge number of RST files.

Since I formally know the content of them, I'd like to gain time and space by directly writing the docutils, skipping the RST generation and parsing of them.

Is there a way to directly write doctree files and integrate them into my Sphinx documentation?


Solution

  • This is what i'm looking for: https://github.com/sphinx-doc/sphinx/issues/1139. It's not a working feature for the moment.