mkdocs-material: Favicon setting creates orphan file or incorrect file

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

  1. If you specifiy a custom favicon via the favicon setting, Material still generates the default favicon.png file favicon and puts it in assets/images/. The generated help correctly uses the custom favicon, but an orphan favicon.png file is included in the output.
  2. If you specify a custom favicon via the favicon setting and the path to the custom icon is [docs_dir]/assets/images/favicon.png, the custom icon is not included in the output. Instead, the default icon favicon is used.

Expected behavior

The correct favicon should be displayed in the output. No orphan favicon.png file should be included in the output.

Actual behavior

See description.

Steps to reproduce the bug

  1. Create an empty project.
  2. In mkdocs.yml, set the favicon setting to any path (causes issue 1) or to assets/images/favicon.png (causes issue 2).

Package versions

  • Python: 3.7.3.
  • MkDocs: 1.0.4
  • Material: 4.4.2

Project configuration

Issue 1:

theme:
  name: material
  favicon: favicon.ico

Issue 2:

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

System information

  • OS: Windows 10
  • Browser: Any

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 16 (15 by maintainers)

Most upvoted comments

Hmm. I installed the latest dev version via pip install https://github.com/mkdocs/mkdocs/archive/master.tar.gz, but both issues persist. Which is a little weird since @neoword did the same (as mentioned in https://github.com/mkdocs/mkdocs/pull/1672) and it worked for him. Or do I specifically have to work off commit #f200a60? How do I do that?

But yeah, I suppose this issue can be closed anyway. Thanks for your time!