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

Favicon is not showing if it's stored on remote URL and privacy plugin enabled #4631

Closed
5 tasks done
Guts opened this issue Nov 13, 2022 · 3 comments
Closed
5 tasks done
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@Guts
Copy link
Contributor

Guts commented Nov 13, 2022

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

When privacy plugin is enabled and the theme:favicon is pointing to a remote image, the favicon is not showing.

Expected behaviour

rel=icon pointing to the favicon defined in theme configuration. Or specify that only local files can be used.

But I'm also asking myself about the case where the remote favicon is stored in one an excluded domain in privacy plugin. What to expect?

Actual behaviour

Privacy plugin + remote favicon: no rel=icon

Steps to reproduce

See configurations

Package versions

  • Python: 3.10 (default on Ubuntu 22.04) but also on GitHub Actions with ubuntu-latest
  • MkDocs: 1.4.2
  • Material: 8.5.10-insiders-4.26.2

Configuration

Without privacy plugin with local favicon file:

site_name: My Docs

theme:
  name: material
  favicon: assets/images/geotribu_logo_64x64.png

Result: <link rel="icon" href="assets/images/geotribu_logo_64x64.png">

Without privacy plugin with remote file:

site_name: My Docs

theme:
  name: material
  favicon: https://cdn.geotribu.fr/img/internal/charte/geotribu_logo_64x64.png

plugins:
  - privacy:
      enabled: false

Result : <link rel="icon" href="https://cdn.geotribu.fr/img/internal/charte/geotribu_logo_64x64.png">

With privacy plugin enabled and favicon as remote file:

site_name: My Docs

theme:
  name: material
  favicon: https://cdn.geotribu.fr/img/internal/charte/geotribu_logo_64x64.png
  font: false

plugins:
  - privacy:
      enabled: true
      external_links_attr_map:
        target: _blank
      external_assets_exclude:
        # geotribu
        - cdn.geotribu.fr/images/*

Result: no favicon

System information

  • Operating system: every
  • Browser: FF, Chromium...
@squidfunk squidfunk added the bug Issue reports a bug label Nov 13, 2022
@squidfunk
Copy link
Owner

squidfunk commented Nov 13, 2022

Thanks for reporting. Fixed in squidfunk/mkdocs-material-insiders@5a08378a7. It didn't came to my mind that favicons might also be external. There's one more issue that doesn't impact functionality, but is a little odd – the file extension is sometimes appended albeit the file already includes the extension, i.e. *.png.png. I'll tackle this separately.

@squidfunk squidfunk added the resolved Issue is resolved, yet unreleased if open label Nov 13, 2022
@squidfunk
Copy link
Owner

Released as part of 8.5.10+insiders-4.26.3.

I'll revisit the double extension thing in the coming weeks, as it doesn't impact functionality.

Guts added a commit to geotribu/website that referenced this issue Nov 15, 2022
Actuellement, la favicon n'apparaît plus. Ticket upstream :
squidfunk/mkdocs-material#4631

~~En attendant une réponse voire une correction, on utilise une image
locale.~~

La correction ayant été rapidement publiée, on utilise plutôt la dernière
version du thème.
@squidfunk
Copy link
Owner

squidfunk commented Nov 27, 2022

The problem with the redundant file extension was fixed in 4290765 and released as part of 8.5.10+insiders-4.26.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