Skip to content

Commit

Permalink
Use YAML frontmatter to configure Sankey diagram.
Browse files Browse the repository at this point in the history
  • Loading branch information
kdeldycke committed Oct 21, 2024
1 parent d3627dd commit e2f2900
Show file tree
Hide file tree
Showing 5 changed files with 222 additions and 212 deletions.
13 changes: 0 additions & 13 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,6 @@

# Always use the latest version of Mermaid.
mermaid_version = "latest"
# XXX Force hiding 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"
Expand Down
2 changes: 2 additions & 0 deletions extra_platforms/docs_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ def generate_platform_sankey() -> str:
config:
sankey:
showValues: false
width: 800
height: 400
---
sankey-beta\n
""")
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ docs = [
# sphinx-design 0.5.0 is the first to allow Sphinx 7.
"sphinx-design >= 0.5",
"sphinx-issues ~= 4.1.0",
"sphinxcontrib-mermaid ~= 0.9.2",
"sphinxcontrib-mermaid ~= 1.0.0",
"sphinxext-opengraph ~= 0.9.0",
"tomli ~= 2.0.1 ; python_version < '3.11'",
]
Expand Down
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ Relationships between groups and platforms:
config:
sankey:
showValues: false
width: 800
height: 400
---
sankey-beta
Expand Down
Loading

0 comments on commit e2f2900

Please sign in to comment.