Fixed tags plugin crashing on numeric tags

This commit is contained in:
squidfunk 2024-05-24 13:38:50 +02:00
parent 05af8988c8
commit 1b346eb57b
No known key found for this signature in database
GPG Key ID: 5ED40BC4F9C436DF
2 changed files with 2 additions and 2 deletions

View File

@ -100,7 +100,7 @@ class TagsPlugin(BasePlugin[TagsConfig]):
tags = page.meta.get("tags", [])
if tags:
for tag in tags:
self.tags[tag].append(page)
self.tags[str(tag)].append(page)
# Inject tags into page (after search and before minification)
def on_page_context(self, context, page, config, nav):

View File

@ -100,7 +100,7 @@ class TagsPlugin(BasePlugin[TagsConfig]):
tags = page.meta.get("tags", [])
if tags:
for tag in tags:
self.tags[tag].append(page)
self.tags[str(tag)].append(page)
# Inject tags into page (after search and before minification)
def on_page_context(self, context, page, config, nav):