Last year, we migrated all our companies documentation to markdown rendered via sphinx. Because of Gitlab and Typora we are a little bit spoiled and wanted to keep our good looking mermaid js graphs - needles to say, that this was not supported by sphinx.
Our solution to that was to use a (hacky) pre- and a postprocessing script in the continious integration.
The script goes through any markdown file and translates the markdown mermaid notation to a simple HTML mermaid notation.
It can be used before the regular sphinx call.
⚠ The source of the markdown files will be changed permanently, so please use this only in context of disposable CI environments.