From 964bb8268c384355819e8371b68597abf5a4cd1a Mon Sep 17 00:00:00 2001 From: Kevin Deldycke Date: Tue, 13 Aug 2024 17:07:02 +0400 Subject: [PATCH] Force zoom and Sankey hidden values globally Refs: https://github.com/mgaitan/sphinxcontrib-mermaid/issues/147 --- docs/conf.py | 14 ++++++++++++++ docs/install.md | 1 - readme.md | 5 +++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 1823b4bc1..48dd715b7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -58,6 +58,20 @@ # Always use the latest version of Mermaid. mermaid_version = "latest" +# XXX Force hidding of Sankey values globally while we wait for in-place front-matter +# support: https://github.com/mgaitan/sphinxcontrib-mermaid/issues/147 +mermaid_init_js = """ + const config = { + startOnLoad: true, + sankey: { + width: 800, + height: 400, + showValues: false, + }, + }; + mermaid.initialize(config); +""" +mermaid_d3_zoom = True master_doc = "index" diff --git a/docs/install.md b/docs/install.md index 909111546..403cb9a97 100644 --- a/docs/install.md +++ b/docs/install.md @@ -368,5 +368,4 @@ FYI, here is a graph of Python package dependencies: ```mermaid assets/dependencies.mmd :align: center -:zoom: ``` diff --git a/readme.md b/readme.md index 6b50d1c29..55cc05c6e 100644 --- a/readme.md +++ b/readme.md @@ -62,6 +62,11 @@ One CLI to rule them all: ```mermaid +--- +config: + sankey: + showValues: false +--- sankey-beta Meta Package Manager,apm,1