Search code examples
faviconread-the-docsmkdocs

How to add favicon for mkdocs websites?


I am developing mkdocs website. Here I need to add favicon for my website. I tried like this but it is not working.

I added site_favicon in mkdocs.yaml file and using readthedocs theme. But it is not working

site_favicon: img/favicon.ico

Can anyone help me with this?


Solution

  • Simply save your new image to img/favicon.ico within your docs_dir. There is no need to change any setting.

    Back in version 0.16.0, the site_favicon configuration setting was deprecated. Then in version 0.17.0 is was completely removed. Therefore, your config is doing nothing.

    All of that said, you may be running into the bug reported at #1671, which was fixed in #1672 and will be available in the next release. If so, you will need to wait until 1.1 is released.