The default tag icon does not take effect
Xiaokang2022 opened this issue · 1 comments
Context
No response
Bug description
When I configure the content of the configuration file as follows, the default icon of the tag does not take effect:
site_name: My Docs
theme:
name: material
icon:
tag:
default: material/tag
plugins:
- tags
This is what index.md is about:
---
tags:
- tag1
- tag2
- tag3
---
# Welcome to MkDocs
I had to add something that looked meaningless to get the default icon to work:
site_name: My Docs
theme:
name: material
icon:
tag:
default: material/tag
extra:
tags:
_: _
plugins:
- tags
According to the documentation, the tags
in extra
are meant to associate tags with the icons, but I don't want to do that, I just want the default icons. It doesn't make sense for me to add tags
in extra
at this point.
Related links
- Reporting a bug
- https://squidfunk.github.io/mkdocs-material/plugins/tags/
- https://squidfunk.github.io/mkdocs-material/setup/setting-up-tags/
Reproduction
9.5.44-default-tag-icon-bug.zip
Steps to reproduce
Just run it according to the above configuration to see the results.
Browser
Edge
Before submitting
- I have read and followed the bug reporting guidelines.
- I have attached links to the documentation, and possibly related issues and discussions.
- I assure that I have removed all customizations before submitting this bug report.
- I have attached a .zip file with a minimal reproduction using the built-in info plugin.
Thanks for reporting. This is actually an edge case – our use case says: if people want to add icons to tags, they add deliberate icons, and the default icon is only displayed if no other icon is set. Only showing the default icon is something we're currently considering an edge case. If we'd add another configuration option saying "show icons", users would forget to activate that and create more issues. Thus, we'll rather keep it simple, and require at least one tag mapping. If you do not need any custom icon, but only want to change the default icon, you already provided the workaround for this.
Closing as resolved via configuration change.