Skip to content

Commit 2f0ab4c

Browse files
committed
Merge branch 'rolling' into 3di-toc-changes
2 parents 36f725e + 739b3cb commit 2f0ab4c

7 files changed

Lines changed: 346 additions & 295 deletions

File tree

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ ifeq ($(OS),Windows_NT)
99
endif
1010
BUILD = $(PYTHON) -m sphinx
1111
OPTS =-c . -W # Treat warnings as errors
12+
LIVE_HOST ?= 0.0.0.0
13+
LIVE_PORT ?= 2022
1214

1315
DICTIONARIES := codespell_dictionary.txt codespell_whitelist.txt
1416

@@ -61,4 +63,7 @@ linkcheck:
6163
@echo
6264
@echo "Check finished. Report is in $(LINKCHECKDIR)."
6365

64-
.PHONY: help Makefile multiversion test test-tools linkcheck lint spellcheck check-dictionaries sort-dictionaries
66+
serve:
67+
sphinx-autobuild --host $(LIVE_HOST) --port $(LIVE_PORT) -c . $(SOURCE) $(OUT)/html
68+
69+
.PHONY: help Makefile multiversion test test-tools linkcheck serve lint spellcheck check-dictionaries sort-dictionaries

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,27 @@ For local testing of the current tree use:
5151

5252
`sensible-browser build/html/index.html`
5353

54+
### Live-reload local development
55+
56+
To iterate on documentation without manually rebuilding and refreshing the browser, use [`sphinx-autobuild`](https://github.com/sphinx-doc/sphinx-autobuild).
57+
It watches the source files, rebuilds incrementally on save, and serves the result with automatic browser reload.
58+
59+
`sphinx-autobuild` is installed as part of `requirements.txt`.
60+
Start the live server with:
61+
62+
```
63+
make serve
64+
```
65+
66+
Then open `http://localhost:2022` in a browser.
67+
68+
The `serve` target binds to `0.0.0.0:2022` by default (a little ROS 2 vibe) so the server is reachable through devcontainer / port forwarding.
69+
Override the bind address or port if needed:
70+
71+
```
72+
make serve LIVE_HOST=127.0.0.1 LIVE_PORT=8080
73+
```
74+
5475
### Spelling Check
5576

5677
To check the spelling, use:

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ docutils
44
pip
55
pytest
66
sphinx
7+
sphinx-autobuild
78
sphinx-copybutton
89
sphinx-lint
910
sphinx-multiversion

0 commit comments

Comments
 (0)