Skip to content

Commit d1a989d

Browse files
committed
docs: Add --post-build use case
1 parent b31faa5 commit d1a989d

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

README.rst

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ which can seen by running ``sphinx-autobuild --help``:
6767
--delay DELAY how long to wait before opening the browser
6868
--watch DIR additional directories to watch
6969
--pre-build COMMAND additional command(s) to run prior to building the documentation
70-
--post-build COMMAND additional command(s) to run after building the documentation (default: [])
70+
--post-build COMMAND additional command(s) to run after building the documentation
7171
7272
Using with Makefile
7373
-------------------
@@ -127,13 +127,6 @@ all pages are built from the same state of the HTML theme.
127127
It also works around a `known issue in Sphinx <relevant sphinx bugs_>`__
128128
which causes significant problems during theme development.
129129

130-
Post-build resources can be processed by passing a user-defined command to
131-
``--post-build``.
132-
133-
.. code-block:: bash
134-
135-
--post-build "npx tailwindcss -i ./src/input.css -o ./src/output.css"
136-
137130

138131
Working on multiple projects
139132
----------------------------
@@ -149,6 +142,20 @@ to avoid needing to manually manage ports and opening browser windows
149142
sphinx-autobuild --port=0 --open-browser pikachu/docs pikachu/docs/_build/html &
150143
sphinx-autobuild --port=0 --open-browser magikarp/docs magickarp/docs/_build/html &
151144
145+
146+
Notify when build starts and ends
147+
---------------------------------
148+
149+
When running sphinx-autobuild as a daemon, users may need to be notified when
150+
the build starts and ends (require libnotify and a notification server).
151+
152+
.. code-block:: bash
153+
154+
sphinx-autobuild docs docs/_build/html/ \
155+
--pre-build 'notify-send "sphinx-autobuild: build start"' \
156+
--post-build 'notify-send "sphinx-autobuild: build end"'
157+
158+
152159
Relevant Sphinx Bugs
153160
====================
154161

0 commit comments

Comments
 (0)