diff --git a/CMakeLists.txt b/CMakeLists.txt
index f81c5ea0..34983c02 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -195,6 +195,7 @@ IF (NOT JFJOCH_WRITER_ONLY)
COMMAND npm ci
COMMAND npm run build
COMMAND npm run redocly
+ COMMAND npm run docs # bundle Sphinx docs into dist/docs (served at /frontend/docs)
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/frontend)
ADD_CUSTOM_TARGET(frontend DEPENDS frontend/dist/index.html)
diff --git a/docs/CPU_DATA_ANALYSIS.md b/docs/CPU_DATA_ANALYSIS.md
index 620a5339..e7ff6a34 100644
--- a/docs/CPU_DATA_ANALYSIS.md
+++ b/docs/CPU_DATA_ANALYSIS.md
@@ -609,5 +609,3 @@ Numerical quadrature over a scaled intensity variable is used to compute posteri
- **Space-group symmetry** beyond centering absences is not necessarily enforced during prediction/integration unless the space group is supplied and used downstream.
- **Resolution masking and ice rings** are controllable; including ice-ring spots in indexing can improve robustness for some samples but may bias refinement in others.
- **Rotation vs still modes** differ substantially in prediction and scaling because partiality is angle-driven in rotation data and excitation-error-driven in still data.
-
----
diff --git a/docs/conf.py b/docs/conf.py
index 029de2d0..d5b883ba 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -29,7 +29,15 @@ myst_enable_extensions = [
'amsmath',
]
-myst_heading_anchor = 3
+myst_heading_anchors = 3
+
+# The OpenAPI Python-client pages under docs/python_client/ are generated by the
+# openapi-generator and contain header-level jumps and intra-page anchors that MyST
+# cannot resolve. We do not hand-edit generated files, so silence that noise here;
+# the hand-written docs are anchor-clean once myst_heading_anchors is set above.
+# 'config.cache' fires only because the sphinx_material theme stores a function in
+# html_context, which is harmless for our single-shot builds.
+suppress_warnings = ['myst.header', 'myst.xref_missing', 'config.cache']
# Render LaTeX-style math nicely in HTML and support AMS-style equation numbering.
mathjax3_config = {
diff --git a/docs/index.rst b/docs/index.rst
index c6016839..52e95c02 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -22,6 +22,7 @@ Jungfraujoch is distributed under the GPLv3 license.
SOFTWARE
VERSIONING
DEPLOYMENT
+ REPOSITORIES
CHANGELOG
.. toctree::
@@ -67,4 +68,13 @@ Jungfraujoch is distributed under the GPLv3 license.
:caption: OpenAPI Python client
python_client/README
- python_client/docs/DefaultApi
\ No newline at end of file
+ python_client/docs/DefaultApi
+
+.. The remaining python_client/docs/*.md pages are generated per-model reference
+ files linked from the client README/DefaultApi; include them in a hidden glob
+ toctree so they are built without each one warning about being orphaned.
+.. toctree::
+ :hidden:
+ :glob:
+
+ python_client/docs/*
diff --git a/frontend/package.json b/frontend/package.json
index 362fc4c6..ca8ef706 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -33,6 +33,7 @@
"build": "tsc && vite build",
"serve": "vite preview",
"redocly": "redocly build-docs ../broker/jfjoch_api.yaml --output=dist/openapi.html",
+ "docs": "bash ../make_doc.sh dist/docs",
"redocly4broker": "redocly build-docs ../broker/jfjoch_api.yaml --output=../broker/redoc-static.html",
"openapi": "openapi-ts"
},
diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx
index 2b11076b..f0746031 100644
--- a/frontend/src/App.tsx
+++ b/frontend/src/App.tsx
@@ -181,7 +181,7 @@ function App() {
)},
{ id: 'documentation', label: 'Documentation', icon: , render: () => (
-
+
)},
]},
];
diff --git a/make_doc.sh b/make_doc.sh
index 6af1d0c1..7853ad44 100644
--- a/make_doc.sh
+++ b/make_doc.sh
@@ -2,11 +2,30 @@
set -euo pipefail
-python3.11 -m venv tmp_venv/
+# Build the Sphinx HTML documentation.
+#
+# Usage: make_doc.sh [output_dir]
+# output_dir where the rendered HTML is written (default: ./public).
+# Relative paths are resolved against the caller's working
+# directory, so the frontend build can point this at frontend/dist/docs.
+#
+# The Python interpreter can be overridden with $PYTHON (default: python3.11).
+
+OUT="${1:-public}"
+PYTHON="${PYTHON:-python3.11}"
+
+# Resolve the output directory to an absolute path before we change directories.
+mkdir -p "$OUT"
+OUT="$(cd "$OUT" && pwd)"
+
+# Run from the repository root regardless of where the script was invoked from.
+cd "$(dirname "$0")"
+
+"$PYTHON" -m venv tmp_venv/
source tmp_venv/bin/activate
pip install -r docs/requirements.txt
-sphinx-build -b html docs public
+sphinx-build -b html docs "$OUT"
rm -rf tmp_venv/