Skip to content

Commit 56837be

Browse files
Add support for uv run make livehtml
1 parent 6b0686a commit 56837be

File tree

4 files changed

+183
-4
lines changed

4 files changed

+183
-4
lines changed

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,8 @@ help:
1818
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
1919
%: Makefile
2020
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21+
22+
# Add -b dirhtml for main_nav_links to work as expected.
23+
# Add --pre-build "rm -rf build" to ensure a clean build directory.
24+
livehtml:
25+
sphinx-autobuild -b dirhtml --pre-build "rm -rf build" "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ readme = "README.md"
66
requires-python = ">=3.13"
77
dependencies = [
88
"sphinx>=8.2.3",
9+
"sphinx-autobuild>=2025.8.25",
910
"sphinxawesome-theme>=5.3.2",
1011
]

source/contribute.rst

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,21 @@ Contribute
1717
- `Quick reStructuredText <https://docutils.sourceforge.io/docs/user/rst/quickref.html>`_
1818
- `The reStructuredText_ Cheat Sheet: Syntax Reminders <https://docutils.sourceforge.io/docs/user/rst/cheatsheet.rst>`_
1919

20-
6. Build your changes locally.
20+
6. Start a live preview server to see your changes in real-time.
2121

2222
.. code-block:: bash
2323
24-
rm -rf build; uv run make html
24+
uv run make livehtml
2525
26-
7. Open the generated HTML files (``./build/html/index.html``) in your browser to review your changes.
27-
8. Commit and push your changes to your forked repository.
26+
7. Open your web browser and navigate to `http://localhost:8000 <http://localhost:8000>`_ to view the documentation.
27+
8. Commit and push your changes to your forked repository.
2828
9. Create a pull request to the main repository.
29+
30+
Adding Packages
31+
---------------
32+
33+
To add a new package, use the following command:
34+
35+
.. code-block:: bash
36+
37+
uv add <package-name> # e.g. uv add sphinx-autobuild

0 commit comments

Comments
 (0)