question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Default favicon is always included in output

See original GitHub issue

I checked that…

  • … the documentation does not mention anything about my problem
  • … the problem doesn’t occur with the default MkDocs template
  • … the problem is not in any of my customizations (CSS, JS, template)
  • … there are no open or closed issues that are related to my problem

Description

When changing the default favicon via …

theme:
  favicon: images/favicon.png

… then this icon is correctly used in the output, but the default favicon is still copied to [site_dir]/assets/images/favicon.png.

Tested with Windows and macOS.

Expected behavior

Only one favicon file should be included in the output.

Actual behavior

Two favicons are included in the output: the default icon and the custom icon.

Steps to reproduce the bug

  1. Create a blank project with mkdocs new.
  2. Change mkdocs.yml to:
site_name: My Docs
theme:
  name: material
  favicon: images/favicon.png
  1. Run mkdocs build.

Output folder structure:

15-06-_2020_13-47-46

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
wilhelmercommented, Jun 15, 2020

Follow-up: You can actually use mkdocs-exclude to exclude the orphan file. IMHO, this is the most elegant solution:

plugins:
    - exclude:
        glob:
            - assets/images/favicon.png
0reactions
squidfunkcommented, Jun 15, 2020

So it’s only fixable by a) overriding, b) post processing.

Correct 😊 Closing as answered.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to prevent favicon.ico requests? - Stack Overflow
I will first say that having a favicon in a Web page is a good thing (normally). However it is not always desired...
Read more >
Setting A Default Favicon For The Browser Output
First, you need to create your icon in the .ico format and name it favicon.ico, copy it to your project directory and then...
Read more >
What Are Favicons: Everything You Need to Know in 2021
Favicons are used in browser tabs, browser history, toolbar apps, bookmarks dropdown, search bar, and search bar recommendations. In all of ...
Read more >
WordPress default icon under /favicon.ico
@phbernard: I noticed that the sites suddenly show the default WordPress icon instead of the one RealFaviconGenerator was set up with. A check...
Read more >
Remove default favicon [#3199421] | Drupal.org
By default serve no favicon. Issue fork drupal-3199421. Command icon Show commands.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found