Skip to content

Commit fb0f3d1

Browse files
authored
Don't watch the build docs dir (#484)
Before 40415a3 the plugin was creating a new temporary directory on every reload so built artifacts weren't marked as changed. After the update, the same temporary directory is used. This caused built artifacts to trigger a file change event. This fix unwatches the build docs dir so those changes don't fire rebuild events. Now only file changes in the source directory should trigger rebuilds as expected.
1 parent a2a26e9 commit fb0f3d1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

mkdocs_simple_plugin/plugin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,8 @@ def on_serve(self, server, *, config, builder):
329329
# watch the original docs/ directory
330330
if os.path.exists(self.orig_docs_dir):
331331
server.watch(self.orig_docs_dir)
332-
server.watch(self.config["build_docs_dir"])
332+
# don't watch the build directory
333+
server.unwatch(self.config["build_docs_dir"])
333334

334335
# watch all the doc files
335336
for path in self.paths:

0 commit comments

Comments
 (0)