mirror of https://github.com/pyodide/pyodide.git
Deploy console.html as part of the documentation (#1445)
This commit is contained in:
parent
f063719e98
commit
60c1e04b15
7
Makefile
7
Makefile
|
@ -75,6 +75,13 @@ build/console.html: src/templates/console.html
|
||||||
cp $< $@
|
cp $< $@
|
||||||
sed -i -e 's#{{ PYODIDE_BASE_URL }}#$(PYODIDE_BASE_URL)#g' $@
|
sed -i -e 's#{{ PYODIDE_BASE_URL }}#$(PYODIDE_BASE_URL)#g' $@
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: docs/_build/html/console.html
|
||||||
|
docs/_build/html/console.html: src/templates/console.html
|
||||||
|
cp $< $@
|
||||||
|
sed -i -e 's#{{ PYODIDE_BASE_URL }}#$(PYODIDE_BASE_URL)#g' $@
|
||||||
|
|
||||||
|
|
||||||
.PHONY: build/webworker.js
|
.PHONY: build/webworker.js
|
||||||
build/webworker.js: src/webworker.js
|
build/webworker.js: src/webworker.js
|
||||||
cp $< $@
|
cp $< $@
|
||||||
|
|
13
docs/conf.py
13
docs/conf.py
|
@ -3,9 +3,11 @@
|
||||||
|
|
||||||
# -- Path setup --------------------------------------------------------------
|
# -- Path setup --------------------------------------------------------------
|
||||||
|
|
||||||
|
import os
|
||||||
import sys
|
import sys
|
||||||
from typing import Dict, Any
|
from typing import Dict, Any
|
||||||
import pathlib
|
import pathlib
|
||||||
|
import subprocess
|
||||||
|
|
||||||
base_dir = pathlib.Path(__file__).resolve().parent.parent
|
base_dir = pathlib.Path(__file__).resolve().parent.parent
|
||||||
path_dirs = [
|
path_dirs = [
|
||||||
|
@ -102,3 +104,14 @@ htmlhelp_basename = "Pyodidedoc"
|
||||||
|
|
||||||
# A list of files that should not be packed into the epub file.
|
# A list of files that should not be packed into the epub file.
|
||||||
epub_exclude_files = ["search.html"]
|
epub_exclude_files = ["search.html"]
|
||||||
|
|
||||||
|
if "READTHEDOCS" in os.environ:
|
||||||
|
env = {"PYODIDE_BASE_URL": "https://cdn.jsdelivr.net/pyodide/dev/full/"}
|
||||||
|
os.makedirs("_build/html", exist_ok=True)
|
||||||
|
res = subprocess.check_output(
|
||||||
|
["make", "-C", "..", "docs/_build/html/console.html"],
|
||||||
|
env=env,
|
||||||
|
stderr=subprocess.STDOUT,
|
||||||
|
encoding="utf-8",
|
||||||
|
)
|
||||||
|
print(res)
|
||||||
|
|
Loading…
Reference in New Issue