Skip to content

Commit 88753a8

Browse files
committed
docs(build): switch from html to dirhtml builder for clean URLs
why: The html builder generates relative paths like ../index.html and # that go stale after SPA navigation across directory depths. The dirhtml builder generates clean URLs natively (/api/ instead of /api/index.html). what: - Change html, start, and design recipes to use -b dirhtml - sphinx-autobuild serves dirhtml correctly (StaticFiles html=True) - SPA nav already handles / endings (shouldIntercept checks endsWith("/")) - rediraffe supports dirhtml natively (DirectoryHTMLBuilder detection)
1 parent bbb347c commit 88753a8

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

docs/justfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ default:
3030
# Build HTML documentation
3131
[group: 'build']
3232
html:
33-
{{ sphinxbuild }} -b html {{ allsphinxopts }} {{ builddir }}/html
33+
{{ sphinxbuild }} -b dirhtml {{ allsphinxopts }} {{ builddir }}/html
3434
@echo ""
3535
@echo "Build finished. The HTML pages are in {{ builddir }}/html."
3636

@@ -205,9 +205,9 @@ dev:
205205
# Start sphinx-autobuild server
206206
[group: 'dev']
207207
start:
208-
{{ sphinx_autobuild }} "{{ sourcedir }}" "{{ builddir }}" {{ sphinxopts }} --port {{ http_port }}
208+
{{ sphinx_autobuild }} -b dirhtml "{{ sourcedir }}" "{{ builddir }}" {{ sphinxopts }} --port {{ http_port }}
209209

210210
# Design mode: watch static files and disable incremental builds
211211
[group: 'dev']
212212
design:
213-
{{ sphinx_autobuild }} "{{ sourcedir }}" "{{ builddir }}" {{ sphinxopts }} --port {{ http_port }} --watch "." -a
213+
{{ sphinx_autobuild }} -b dirhtml "{{ sourcedir }}" "{{ builddir }}" {{ sphinxopts }} --port {{ http_port }} --watch "." -a

0 commit comments

Comments
 (0)