Tags not working as expected #8530
-
|
Hi, I'm currently migrating my website and my blog to MkDocs Material. Since is my first post here, kudos to the developers for their great work! So far things look great. I have one small detail that I can't seem to figure out. I have my site and my blog merged, and I'd like to use tags for the blog. I activated the Here's an example: https://kikinovak.gitlab.io/microlinux/blog/apprendre-un-metier/ And here's another example: https://kikinovak.gitlab.io/microlinux/blog/qualiopi/
Any suggestions ? Cheers from the sunny South of France, Niki |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
I have found a solution that somehow works, but I'm puzzled. After a couple hours of experimenting with all possible permutations, here's what I came up with: I created a And now things work. Well, I get the following warning when launching Except when I remove the Any suggestions ? |
Beta Was this translation helpful? Give feedback.
-
|
Hi @kikinovak,
Now since 9.6.0 a new tags plugin was implemented, and the logic was "reversed" or simplified for user experience.
The old logic still works for now, for backwards compatibility, and it will probably work forever since 9.7.0 is the last version, but the warning is still there, as it's not the recommended approach. So instead add the placeholder marker in any file: Source code for the current mkdocs-material/material/plugins/tags/plugin.py Lines 258 to 274 in 7f32877 Docs: https://squidfunk.github.io/mkdocs-material/setup/setting-up-tags/#adding-a-tags-index |
Beta Was this translation helpful? Give feedback.
-
|
Thank you very much for your detailed explanation ! I changed my code accordingly, and everything works perfectly now. |
Beta Was this translation helpful? Give feedback.
Hi @kikinovak,
before version 9.6.0 the tags plugin use another logic, where the user defined the file path to the index page for the tags, and then the plugin would use that file and add the index to it.
tags_file: blog/tags.mdand optionally the location of the index in that file with a markerNow since 9.6.0 a new tags plugin was implemented, and the logic was "reversed" or simplified for user experience.