Skip to content

Commit a54a375

Browse files
committed
Fix CMS doc build
1 parent 0df2379 commit a54a375

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

doc/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ BUILDDIR_CMS = _build-cms
2121

2222
NODE_MODULES = $(BUILDDIR_CMS)/node_modules
2323
MMDC = $(NODE_MODULES)/.bin/mmdc
24+
PUPPETEER_CFG = $(BUILDDIR_CMS)/puppeteer-config.json
2425

25-
.PHONY: help html cms-html install-mermaid clean-mermaid clean
26+
.PHONY: help html cms-html install-mermaid clean
2627

2728
help:
2829
@echo "Available targets:"
@@ -50,6 +51,7 @@ $(MMDC):
5051
@echo "Installing @mermaid-js/mermaid-cli via npm..."
5152
@mkdir -p $(BUILDDIR_CMS)
5253
@cd $(BUILDDIR_CMS) && npm install @mermaid-js/mermaid-cli
54+
@echo '{"args": ["--no-sandbox"]}' > $(PUPPETEER_CFG)
5355
@echo "mermaid-cli installed successfully."
5456

5557
clean:

doc/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,12 @@ def setup(app):
8484
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
8585

8686
is_cms_build = os.environ.get("CLOUDAI_DOC_TARGET") == "cms"
87-
html_theme, mermaid_output_format, mermaid_cmd = "nvidia_sphinx_theme", "raw", ""
87+
html_theme, mermaid_output_format, mermaid_cmd, mermaid_params = "nvidia_sphinx_theme", "raw", "", []
8888
if is_cms_build:
8989
html_theme = "sphinx_rtd_theme"
9090
mermaid_output_format = "png"
9191
mermaid_cmd = str(Path.cwd() / "_build-cms/node_modules/.bin/mmdc")
92+
mermaid_params = ["-p", str(Path.cwd() / "_build-cms/puppeteer-config.json")]
9293

9394
# Set the root document to index
9495
root_doc = "index"

0 commit comments

Comments
 (0)