diff --git a/material/plugins/tags/plugin.py b/material/plugins/tags/plugin.py index 084b59cb47e..875c713b2b4 100644 --- a/material/plugins/tags/plugin.py +++ b/material/plugins/tags/plugin.py @@ -128,7 +128,11 @@ def _get_tags_file(self, files, path): log.error(f"Tags file '{path}' does not exist.") sys.exit(1) - # Add tags file to files + # Add tags file to files - note: since MkDoc 1.6, not removing the + # file before adding it to the end will trigger a deprecation warning + # The new tags plugin does not require this hack, so we're just going + # to live with it until the new tags plugin is released. + files.remove(file) files.append(file) return file diff --git a/src/plugins/tags/plugin.py b/src/plugins/tags/plugin.py index 084b59cb47e..875c713b2b4 100644 --- a/src/plugins/tags/plugin.py +++ b/src/plugins/tags/plugin.py @@ -128,7 +128,11 @@ def _get_tags_file(self, files, path): log.error(f"Tags file '{path}' does not exist.") sys.exit(1) - # Add tags file to files + # Add tags file to files - note: since MkDoc 1.6, not removing the + # file before adding it to the end will trigger a deprecation warning + # The new tags plugin does not require this hack, so we're just going + # to live with it until the new tags plugin is released. + files.remove(file) files.append(file) return file