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
524 stars 75 forks source link

Support watching file list & patterns #35

Closed nfarrar closed 8 years ago

nfarrar commented 8 years ago

While python-livereload will take a list of files or pattern (i.e. PROJECT_ROOT/*.rst), it looks like sphinx-autobuild will only allow you to specify an extra path. I was specifically trying to use this to rebuild my docs when it sees an rst file in the root directory change (they are included in the docs) - globs wouldn't work and passing in the root directory causes recursive reloads (it reloads everytime docs/_build is regenerated).

Any chance it'd be possible to add supports for patterns?

GaretJax commented 8 years ago

@nfarrar you can use the -r/--re-ignore option to specify one or more regexes for paths to be ignored. My guess is that -r _build/.* should work.

See here for the implementation: