Fixed deprecation warning in tags plugin

This commit is contained in:
squidfunk 2024-04-29 07:52:22 +07:00
parent edcc5362fe
commit cff4a75d15
No known key found for this signature in database
GPG Key ID: 5ED40BC4F9C436DF
2 changed files with 10 additions and 2 deletions

View File

@ -128,7 +128,11 @@ class TagsPlugin(BasePlugin[TagsConfig]):
log.error(f"Tags file '{path}' does not exist.") log.error(f"Tags file '{path}' does not exist.")
sys.exit(1) 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) files.append(file)
return file return file

View File

@ -128,7 +128,11 @@ class TagsPlugin(BasePlugin[TagsConfig]):
log.error(f"Tags file '{path}' does not exist.") log.error(f"Tags file '{path}' does not exist.")
sys.exit(1) 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) files.append(file)
return file return file