Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tags icons listed before the default entry are ignored #6635

Closed
4 tasks done
Guts opened this issue Jan 10, 2024 · 2 comments
Closed
4 tasks done

Tags icons listed before the default entry are ignored #6635

Guts opened this issue Jan 10, 2024 · 2 comments
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@Guts
Copy link
Contributor

Guts commented Jan 10, 2024

Context

No response

Bug description

Pretty tricky bug that I'm trying to catch up for months now!

Expected behavior: when using tag icons, the order of icons identifiers should not matter and every icon should be rendered, no matter if its identifier is below or above the entry entry.

Given this mkdocs.yml:

site_name: My Docs

plugins: 
  - tags:
      enabled: true


theme:
  name: material
  icon:
    tag:
      database: fontawesome/solid/database
      # icons above this entry are not rendered
      default: fontawesome/solid/tag
      globe: fontawesome/solid/earth-europe

extra: 
  tags:
    DuckDB: database
    GEOS: globe
    PostGIS: database
    PostgreSQL: database
    

This index.md:

---
tags:
    - DuckDB
    - GEOS
    - PostGIS
    - PostgreSQL
---

# Welcome to MkDocs

For full documentation visit [mkdocs.org](https://www.mkdocs.org).

Output:

image

Now, let's move every icon identifiers below ðefault entry:

[...]
theme:
  name: material
  icon:
    tag:
      # icons above this entry are not rendered
      default: fontawesome/solid/tag
      database: fontawesome/solid/database
      globe: fontawesome/solid/earth-europe
[...]

Output:

image

🥳 every defined icons are rendered!

Related links

Reproduction

9.5.3+insiders.4.49.2-plugin_tags_icons_order.zip

Steps to reproduce

  1. Create a page with some tags
  2. In theme.icon.tag, add some icons above and below the default entry
  3. In extra.tags, match between tags and icons
  4. mkdocs serve --> every tag whose icon entry is defined above default does not have its own icon rendered

Browser

Chrome, Firefox

Before submitting

@squidfunk squidfunk added needs investigation Issue must be investigated by the maintainers bug Issue reports a bug and removed needs investigation Issue must be investigated by the maintainers labels Jan 11, 2024
Guts added a commit to geotribu/website that referenced this issue Jan 14, 2024
Le plugin de gestion des mots-clés a subi une refonte qui implique de
nombreux changements
(squidfunk/mkdocs-material#6517). Cette PR
intègre les modifications nécessaires.

De plus, j'ai enfin trouvé le bug qui fait péter pas mal d'icônes de
tags : squidfunk/mkdocs-material#6635. Vu que
l'ordre est significatif, j'ai désactivé le tri automatique du YAML en
sortie.
@squidfunk
Copy link
Owner

Thanks for reporting! Fixed in e68e133.

@squidfunk squidfunk added the resolved Issue is resolved, yet unreleased if open label Jan 15, 2024
@squidfunk
Copy link
Owner

Released as part of 9.5.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

No branches or pull requests

2 participants