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

ENH: Support watching single files #118

Open snowman2 opened 1 year ago

snowman2 commented 1 year ago

Context

In the base directory of a repository, there can be files such as CONTRIBUTING.md that are included in the docs by reference:

\```{include} ../CONTRIBUTING.md
\```

Proposal

It would be nice to be able to watch a specific set of files:

--watch *.md

Otherwise, there is going to be a long list of ignores.

Tasks and updates

No response

welcome[bot] commented 1 year ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

choldgraf commented 1 year ago

I've got a PR to add glob-style ignore matching here:

I think if that is merged, it should be pretty easy to implement this with logic like:

And then append ignore_files to the list that is created if somebody used the --ignore flag.