diff --git a/Makefile b/Makefile index ebe2503ca4b..512cd0d99e8 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: clean test get-sphinx-template docs env data +.PHONY: clean test get-sphinx-template docs live-docs env data export FREEZE_REQUIREMENTS=1 # assume you have installed need packages @@ -38,6 +38,10 @@ docs: clean get-sphinx-template # apt-get install -y texlive-latex-extra dvipng texlive-pictures texlive-fonts-recommended cm-super cd docs && make html --debug --jobs $(nproc) SPHINXOPTS="-W --keep-going" +live-docs: get-sphinx-template + pip install -e . --quiet -r requirements/_docs.txt + cd docs && make livehtml + env: pip install -e . -U -r requirements/_devel.txt diff --git a/docs/Makefile b/docs/Makefile index 35e5650808f..cd9feeea2b1 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -17,3 +17,6 @@ help: # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +livehtml: + sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/requirements/_docs.txt b/requirements/_docs.txt index ea8bbcd7978..638580ec7a9 100644 --- a/requirements/_docs.txt +++ b/requirements/_docs.txt @@ -10,6 +10,7 @@ sphinx-autodoc-typehints ==1.23.0 sphinx-paramlinks ==0.6.0 sphinx-togglebutton ==0.3.2 sphinx-copybutton ==0.5.2 +sphinx-autobuild ==2024.04.16 lightning >=1.8.0, <2.3.0 lightning-utilities ==0.11.2