Skip to main content

Watch a Sphinx directory and rebuild the documentation when a change is detected. Also includes a livereload enabled web server.

Project description

Watch a Sphinx directory and rebuild the documentation when a change is detected. Also includes a livereload enabled web server.

Installation

sphinx-autobuild relies on a not-yet-released version of python-livereload. You can install it through pip by issuing the following command:

pip install https://github.com/lepture/python-livereload/archive/master.zip

You can then use pip to install the package:

pip install sphinx-autobuild

Usage

The package installs a single executable script, named sphinx-autobuild. The script takes the same arguments as the sphinx-build command installed by Sphinx plus a -p/–port option to specify the port on which the documentation shall be served (default 8000).

To build a classical Sphinx documentation set, issue the following command:

sphinx-autobuild docs docs/_build/html

And then visit the webpage served at http://127.0.0.1:8000. Each time a change to the documentation source is detected, the HTML is rebuilt and the browser automatically reloaded.

To stop the server simply press ^C.

Makefile integration

To integrate the sphinx-autobuild command in the Makefile generated by Sphinx, add the following target:

livehtml:

sphinx-autobuild -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html

0.1.0 - 2013/12/25

  • Initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinx-autobuild-0.1.0.tar.gz (9.8 kB view details)

Uploaded Source

File details

Details for the file sphinx-autobuild-0.1.0.tar.gz.

File metadata

File hashes

Hashes for sphinx-autobuild-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f76c96c1bb1b381f2df5542fc411a43d1a3f40e13dbbcb3a8d05a13d781a2bfb
MD5 9dbbe43ca20d1a6679f9e4e6c28ef8c6
BLAKE2b-256 33376ff9e2a34961cb7130bfb1e135a9cd0273338b6efdb588c7c16f99b22193

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page