Skip to content

Commit 97b7fb7

Browse files
gilesknapclaude
andcommitted
Add docs-live Makefile target and use make in docs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a5ae3ae commit 97b7fb7

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ agent-%: clean-agent
88
clean-agent:
99
rm -f agent
1010

11-
.PHONY: lint test docs ci
11+
.PHONY: lint test docs docs-live ci
1212

1313
lint:
1414
golangci-lint run
@@ -19,6 +19,9 @@ test:
1919
docs:
2020
uv run sphinx-build -W --keep-going docs docs/_build/html
2121

22+
docs-live:
23+
uv run sphinx-autobuild docs docs/_build/html
24+
2225
ci:
2326
$(MAKE) -j lint test docs
2427

docs/how-to/run-sphinx.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Run Sphinx
22

3-
This guide explains how to build and preview the project documentation locally using Sphinx.
3+
This guide explains how to build and preview the project documentation locally
4+
using Sphinx. Makefile targets are provided so you don't need to remember the
5+
full commands.
46

57
## Prerequisites
68

@@ -17,24 +19,20 @@ $ uv sync --group docs
1719

1820
## Build the documentation
1921

20-
Run a one-off build into `docs/_build/html`:
22+
Run a one-off build (warnings are treated as errors, matching CI):
2123

2224
```bash
23-
$ uv run sphinx-build docs docs/_build/html
25+
$ make docs
2426
```
2527

26-
To treat warnings as errors (as CI does):
27-
28-
```bash
29-
$ uv run sphinx-build -W --keep-going docs docs/_build/html
30-
```
28+
The output is written to `docs/_build/html`.
3129

3230
## Live preview
3331

3432
For a live-reloading server that rebuilds on changes:
3533

3634
```bash
37-
$ uv run sphinx-autobuild docs docs/_build/html
35+
$ make docs-live
3836
```
3937

4038
Then open the URL shown in the terminal (typically `http://127.0.0.1:8000`).

0 commit comments

Comments
 (0)