I'm using Sphinx to document one of my projects, and I like to preview my changes in my browser. I want to be able to save some changes to an .rst
file, and be able to immediately refresh my browser and see the changes.
Essentially I want to automatically execute a make html
whenever one of the .rst
files is changed.
autodoc imports the modules to be documented. If any modules have side effects on import, these will be executed by autodoc when sphinx-build is run. If you document scripts (as opposed to library modules), make sure their main routine is protected by a if __name__ == '__main__' condition.
You can use sphinx-autobuild.
It is easy to use, for example:
sphinx-autobuild docs docs/_build/html
or, if you have a separate build dir,
sphinx-autobuild source build/html
It will also automatically initiate a page refresh in the browser.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With