Skip to content

Commit f82e7e9

Browse files
committed
docs(build): switch from html to dirhtml builder for clean URLs
why: The html builder generates flat .html files, but the CloudFront function now redirects .html -> /. Without dirhtml output (which creates directory-style index.html files), the redirects lead to 403s because the target paths don't exist in S3. what: - Change html, start, and design targets to use -b dirhtml - Produces quickstart/index.html instead of quickstart.html - CloudFront serves /quickstart/ -> quickstart/index.html correctly
1 parent 5c6f3de commit f82e7e9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

docs/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ clean:
4545
-rm -rf $(BUILDDIR)/*
4646

4747
html:
48-
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
48+
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/html
4949
@echo
5050
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
5151

@@ -182,8 +182,8 @@ dev:
182182
$(MAKE) -j watch serve
183183

184184
start:
185-
uv run sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) --port ${HTTP_PORT} $(O)
185+
uv run sphinx-autobuild -b dirhtml "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) --port ${HTTP_PORT} $(O)
186186

187187
design:
188188
# This adds additional watch directories (for _static file changes) and disable incremental builds
189-
uv run sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) --port ${HTTP_PORT} --watch "." -a $(O)
189+
uv run sphinx-autobuild -b dirhtml "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) --port ${HTTP_PORT} --watch "." -a $(O)

0 commit comments

Comments
 (0)