Unable to display custom logo on the nav bar #5502
-
I'm facing difficulties in displaying a custom logo on the nav bar of my MkDocs website using the Material theme. I have followed the official documentation and tried multiple approaches, but the logo is not appearing as expected. Here are the details of my setup: MkDocs version: latest Could someone please help me troubleshoot this problem? Any guidance, suggestions, or examples of working configurations would be greatly appreciated. Thank you in advance for your assistance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The actual configuration of both the
And inside your theme:
logo: custom/logo.png This guide shows a path relative to the If I guessed correctly then change it to either one of those:
and inside the configuration file: theme:
custom_dir: overrides # only needed for the second approach above
logo: assets/images/logo.png The path doesn't include the custom directory. If I guessed incorrectly, then you could also run |
Beta Was this translation helpful? Give feedback.
The actual configuration of both the
mkdocs.yml
and the file structure would help to pin point the problem.Based on your message I envision a structure like this:
And inside your
mkdocs.yml
This guide shows a path relative to the
docs
directory, or more specifically, to the root of your generated website, so adding thecustom
directory to the path is incorrect, since it's outside of thedocs
directory.https://squidfunk.github.io/mkdocs-material/setup/changing-the-logo-and-icons/#image
If I guessed correctly then change it to either…