diff --git a/.readthedocs.yml b/.readthedocs.yml index 6efd1f88cc..e7abb8f311 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -8,6 +8,7 @@ build: os: "ubuntu-22.04" tools: python: "mambaforge-22.9" + nodejs: "20" jobs: post_install: - cat monodocs-environment.lock.yaml @@ -16,6 +17,8 @@ build: - conda info - conda env list - conda list + - npm install -g @mermaid-js/mermaid-cli + - which mmdc # Build documentation in the docs/ directory with Sphinx sphinx: diff --git a/docs/conf.py b/docs/conf.py index ae4400dd31..38344530c1 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -296,9 +296,11 @@ myst_enable_extensions = ["colon_fence"] # Sphinx-mermaid config -mermaid_output_format = "raw" +mermaid_output_format = "png" mermaid_version = "latest" mermaid_init_js = "mermaid.initialize({startOnLoad:false});" +if not os.environ.get("MONODOCS_DEV_BUILD"): + mermaid_cmd = "/home/docs/.asdf/shims/mmdc" # Makes it so that only the command is copied, not the output copybutton_prompt_text = "$ "