sphinx-doc / sphinx-autobuild

Watch a Sphinx directory and rebuild the documentation when a change is detected. Also includes a hot-reload web server.
MIT License
523 stars 75 forks source link

python script using livereload-python #80

Closed ngzhian closed 3 years ago

ngzhian commented 3 years ago

Thanks for this project! It makes my workflow really smooth. I found some issues with spurious building and reloads, it looked like it was maybe too eagerly watching changes to files. I looked up the livereload-python package (used by this), and found that they have a simple script:

#!/usr/bin/env python
from livereload import Server, shell
server = Server()
server.watch('docs/*.rst', shell('make html', cwd='docs'))
server.serve(root='docs/_build/html')

Leaving this here in case anyone faces similar issues

pradyunsg commented 3 years ago

Thanks for sharing this. :)