This is an automated email from the ASF dual-hosted git repository.

lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git


The following commit(s) were added to refs/heads/main by this push:
     new d194f60a docs: statically render mermaid diagrams to avoid pop-in 
(#1038)
d194f60a is described below

commit d194f60ab81a0e37cb1cb986db502e4e95f0f0c7
Author: David Li <[email protected]>
AuthorDate: Wed Sep 6 11:28:47 2023 -0400

    docs: statically render mermaid diagrams to avoid pop-in (#1038)
    
    Fixes #976.
---
 CONTRIBUTING.md       | 3 +++
 ci/conda_env_docs.txt | 2 ++
 docs/source/conf.py   | 4 +++-
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index b9ce92c4..1ce2d018 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -126,6 +126,9 @@ used as follows:
 ```shell
 $ conda create -n adbc -c conda-forge --file ci/conda_env_docs.txt
 $ conda activate adbc
+# Mermaid must be installed separately
+# While "global", it will end up in your Conda environment
+$ npm install -g @mermaid-js/mermaid-cli
 ```
 
 To build the HTML documentation:
diff --git a/ci/conda_env_docs.txt b/ci/conda_env_docs.txt
index ad1c9939..527f4882 100644
--- a/ci/conda_env_docs.txt
+++ b/ci/conda_env_docs.txt
@@ -20,6 +20,8 @@ doxygen
 # XXX(https://github.com/apache/arrow-adbc/issues/987)
 furo=2023.07.26
 make
+# Needed to install mermaid
+nodejs
 numpydoc
 pytest
 sphinx>=5.0
diff --git a/docs/source/conf.py b/docs/source/conf.py
index 5c370f22..961cef79 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -110,7 +110,9 @@ intersphinx_mapping = {
 
 # -- Options for mermaid -----------------------------------------------------
 
-mermaid_d3_zoom = True
+mermaid_d3_zoom = False
+# Prerender images to avoid page jumping on load
+mermaid_output_format = "png"
 
 # -- Options for numpydoc ----------------------------------------------------
 

Reply via email to