squidfunk / mkdocs-material

Documentation that simply works

Home Page:https://squidfunk.github.io/mkdocs-material/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Items in the left sidebar are being decomposed (NFD or NFKD)

bcdavasconcelos opened this issue · comments

Contribution guidelines

I've found a bug and checked that ...

  • ... the problem doesn't occur with the mkdocs or readthedocs themes
  • ... the problem persists when all overrides are removed, i.e. custom_dir, extra_javascript and extra_css
  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

Hi, thanks for making this beautiful template available.

It seems that some items are going through a canonical (or non-canonical) decomposition in the left sidebar only. This, in turn, causes font rendering issues.

image

image

Expected behaviour

All items are treated equally with some control over the normalization of strings.

Actual behaviour

Strings with diacritical marks are being decomposed.

image

Steps to reproduce

Insert page name with diacritical marks (e.g. áéíóúàèìòùçãõ) to the topmost position in the sidebar.

Package versions

  • Python: Python 3.9.6
  • MkDocs: mkdocs, version 1.3.0
  • Material: Version: 8.2.15

Configuration

site_name: xxxx
copyright: xxx
site_description: >-
  lorem

repo_name: bcdavasconcelos/gdct_mkdocs
repo_url: https://github.com/bcdavasconcelos/gdct_mkdocs
edit_uri: edit/main/docs/
extra_css:
  - stylesheets/extra.css
theme:
  name: material
  language: pt-BR
  font:
    text: Alegreya # /setup/changing-the-fonts/
    code: Inconsolata
  palette:
    - scheme: default
      primary: indigo
      accent: indigo
      toggle:
        icon: material/weather-sunny
        name: Switch to dark mode
    - scheme: slate
      primary: indigo
      accent: indigo
      toggle:
        icon: material/weather-night
        name: Switch to light mode
  features:
  - navigation.instant
  - navigation.tracking
  - navigation.tabs
  - navigation.indexes
  - navigation.top
  - content.code.annotate
  - content.tooltips
  - search.highlight
  - search.share
  - search.suggest
  - toc.follow
  - content.tabs.link
  - header.autohide

plugins:
  - roamlinks
  - git-revision-date-localized:
      type: iso_date
      locale: pt
      timezone: America/Sao_Paulo
  - search:
      lang: pt
  - tags:
      tags_file: tags.md
  - minify:
     minify_html: true
  - redirects:
      redirect_maps:
        reference/abbreviations.md: reference/tooltips.md
        reference/meta-tags.md: reference/index.md

markdown_extensions:
  - abbr
  - admonition
  - attr_list
  - def_list
  - footnotes
  - meta
  - md_in_html
  - pymdownx.arithmatex:
      generic: true
  - pymdownx.betterem:
      smart_enable: all
  - pymdownx.caret
  - pymdownx.details
  - pymdownx.highlight:
      anchor_linenums: true
  - pymdownx.inlinehilite
  - pymdownx.magiclink:
      repo_url_shorthand: true
      user: bcdavasconcelos
      repo: gdct_mkdocs
  - pymdownx.mark
  - pymdownx.smartsymbols
  - pymdownx.tabbed:
      alternate_style: true
  - pymdownx.tasklist:
      custom_checkbox: true
  - pymdownx.keys
  - pymdownx.tilde
  - pymdownx.superfences:
      custom_fences:
        - name: mermaid
          class: mermaid
          format: !!python/name:pymdownx.superfences.fence_code_format
  - pymdownx.emoji:
      emoji_index: !!python/name:materialx.emoji.twemoji
      emoji_generator: !!python/name:materialx.emoji.to_svg
      options:
        custom_icons:
          - overrides/.icons
  - toc:
      permalink: true
      slugify: !!python/object/apply:pymdownx.slugs.slugify {kwds: {normalize: NFC, case: lower, percent_encode: false}}
      separator: "-"
nav:
  - Home: README.md
  - GDCT:
    - Referências:
      - bib-refs/README.md

System information

  • Operating system: macOS 12.3
  • Browser: Safari 15.4

Thanks for reporting. You checked all checkboxes, so you also tested with the mkdocs and readthedocs before reporting, and observed that this behavior only happens in Material for MkDocs, right?

I've invested 15 minutes into trying to reproduce this issue to no avail. When reporting an issue, it's essential that you include a minimal reproducible example, i.e., something we can run and see the immediate effects. The mkdocs.yml you posted is huge and the cause of the problem could be anywhere – please provide a minimal reproduction and attach it here as a zip file. Also, please make sure that this does not happen on the mkdocs and readthedocs theme and isn't related to your customizations (you have extra CSS in-place).

My apologies, @squidfunk. Indeed the problem was on my end and it was being caused by a third party app decomposing unicode characters in my filenames. Sorry for the false alarm.

Thanks for coming back! I'm glad you could isolate the problem 😊 Could you comment on what exactly the problem was? This would be of great help for other users that experience the same or similar problems in the future.

It seems that DEVONthink 3, the macOS app I was using for managing the markdown files, is decomposing precomposed unicode characters into decomposed unicode characters for the filename only (but not the name it displays within the app). I should have inspected the filenames as well 😓. Again, apologies for crying a wolf and thank you for the superb documentation for such a great template.