From 1b346eb57b2871eca8f5e78444cfc83d35ab2a2e Mon Sep 17 00:00:00 2001 From: squidfunk Date: Fri, 24 May 2024 13:38:50 +0200 Subject: [PATCH] Fixed tags plugin crashing on numeric tags --- material/plugins/tags/plugin.py | 2 +- src/plugins/tags/plugin.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/material/plugins/tags/plugin.py b/material/plugins/tags/plugin.py index 875c713b2..2d05415b5 100644 --- a/material/plugins/tags/plugin.py +++ b/material/plugins/tags/plugin.py @@ -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): diff --git a/src/plugins/tags/plugin.py b/src/plugins/tags/plugin.py index 875c713b2..2d05415b5 100644 --- a/src/plugins/tags/plugin.py +++ b/src/plugins/tags/plugin.py @@ -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):