sphinx-doc / sphinx

The Sphinx documentation generator
https://www.sphinx-doc.org/
Other
6.19k stars 2.03k forks source link

Allow prepending instructions in Graphviz dot source #6390

Open pmercier opened 5 years ago

pmercier commented 5 years ago

Add a graphviz_dot_prepend option to allow a documentation to add some dot instruction to every graphs.

Using this method we will be able to do more standard customisation like adding copyright notes, watermarkings, ...

tk0miya commented 5 years ago

I think you can do it with transform module.

class GraphvizUpdater(Transform):
    def apply(self):
        for node in self.document.traverse(graphviz):
            # update graphviz node here

I'm not sure the option is commonly used. So I propose you to extend it as an extension.