Default favicon is always included in output
See original GitHub issueI 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
- Create a blank project with
mkdocs new
. - Change
mkdocs.yml
to:
site_name: My Docs
theme:
name: material
favicon: images/favicon.png
- Run
mkdocs build
.
Output folder structure:
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Follow-up: You can actually use mkdocs-exclude to exclude the orphan file. IMHO, this is the most elegant solution:
Correct 😊 Closing as answered.