diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e6320b0cb445ad03f2efeed30f11ee1c7d614b9b..f0415a0899b0a71c86894e99dfe526cf8285e35f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -93,7 +93,8 @@ pages_prepare: &pages_prepare refs: - /^release-.*$/i script: - - npm install jsdoc jsdoc-sphinx + - npm install -g jsdoc + - npm install @indiscale/jsdoc-sphinx - echo "Deploying" - make doc - rm -r public || true ; cp -r build/doc/html public diff --git a/CHANGELOG.md b/CHANGELOG.md index 9328bc1a36a44c9d08ee16567ee3a81abd401f31..ebd1bf9e76b1cd1342defdbcc6f68550b2c75721 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed ### - [#254](https://gitlab.com/linkahead/linkahead-webui/-/issues/254) "Download files referenced in the table" failed +- [#230](https://gitlab.com/linkahead/linkahead-webui/-/issues/230) + `make doc` is now compatible with npm >= 9.0.0. ## [0.15.0] - 2024-10-01 ## diff --git a/README_SETUP.md b/README_SETUP.md index 9b8a6457d9a0b79fe0d6acf3e8df9294f0074981..99b13956987528a19fedacebf0524675fb694f2f 100644 --- a/README_SETUP.md +++ b/README_SETUP.md @@ -80,13 +80,16 @@ See `build.properties.d/00_default.properties` for more information. ## Build the documentation # -Build documentation in `build/` with `make doc`. +Install the below requirements and build documentation in `build/` +with `make doc`. You may need to set the environment variables used in +`src/doc/Makefile`, especially `JSDOC_BIN` in case you didn't install +jsdoc globally. ### Requirements ## - sphinx - sphinx-autoapi - jsdoc (`npm install jsdoc`) -- jsdoc-sphinx (`npm install jsdoc-sphinx`) +- @indiscale/jsdoc-sphinx (`npm install @indiscale/jsdoc-sphinx`) - sphinx-js - recommonmark diff --git a/src/doc/Makefile b/src/doc/Makefile index 17510caebd1f34ed6dc0bc19108cb41fa730de76..7f5c3d5ec0d0bf6ae06d1ddd3ae6386aa3732ae2 100644 --- a/src/doc/Makefile +++ b/src/doc/Makefile @@ -24,16 +24,15 @@ # It is based upon the autocreated makefile for Sphinx documentation. # You can set these variables from the command line, and also -# from the environment for the first two. +# from the environment for the first four. SPHINXOPTS ?= -a SPHINXBUILD ?= sphinx-build +NPM_PREFIX ?= ../.. +JSDOC_BIN ?= jsdoc # SPHINXAPIDOC ?= javasphinx-apidoc SOURCEDIR = . BUILDDIR = ../../build/doc -# npm is not always in the global PATH -NPM_PATH = $(shell npm bin) -NPM_PREFIX = $(shell npm prefix) .PHONY: doc-help Makefile api @@ -44,8 +43,8 @@ doc-help: # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile api - PATH=$(NPM_PATH):$$PATH $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) # sphinx-build -M html . ../../build/doc api: - PATH=$(NPM_PATH):$$PATH jsdoc -t $(NPM_PREFIX)/node_modules/jsdoc-sphinx/template -d $@ -r "../../src/core" + $(JSDOC_BIN) -t $(NPM_PREFIX)/node_modules/@indiscale/jsdoc-sphinx/template -d $@ -r "../../src/core" diff --git a/src/doc/conf.py b/src/doc/conf.py index 0a6c9acbc6f8cd03b752e526595d87ed882d2a58..2301572b8832bfc216741b02da1f983ff174c343 100644 --- a/src/doc/conf.py +++ b/src/doc/conf.py @@ -196,7 +196,7 @@ primary_domain = 'js' # Not strictly necessary? # -- Options for intersphinx extension --------------------------------------- # Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {'https://docs.python.org/': None} +intersphinx_mapping = {} # TODO Which options do we want? autodoc_default_options = { diff --git a/src/doc/index.rst b/src/doc/index.rst index f5b5d9c5828c8ff7e3d5d26b37dbe6653fc00541..adb28b2df1632b6df3c5bf12791a196419bb8cb9 100644 --- a/src/doc/index.rst +++ b/src/doc/index.rst @@ -28,5 +28,4 @@ the most important concepts and offers a range of Indices and tables ================== -* :ref:`genindex` * :ref:`search`