- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Social plugin unable to load logo icon from custom icon set #4920
Comments
Thanks for reporting. From your example, we can see that you haven't followed the additional icons guide, which is essential to add custom icons. Please try that and report if that helps. As a workaround, you may directly reference the SVG as a logo. |
Hi @squidfunk I did follow the additional icons guide. In my reproduction, I had an SVG icon file located at I'm not sure if you're suggesting adding the following from the additional icons guide:
I did test with that (no change), but left it out of the reproduction in an attempt to include the minimal configuration (since I am not trying to use the icon within markdown). What else can I provide that would help track this down? |
You may have the wrong destination try adding a ./ Here's how mine looks:
|
Thanks - but this bug isn't related to the |
So, I checked your example and it doesn't contain the overrides, so I can't test your logo. However, I've just taken another icon from somewhere and built an example how to achieve what you want. In a nutshell: the social plugin won't search additional icon paths. If you want to use a custom icon, just reference it in theme:
logo: images/logo.svg One limitation of this approach is that the logo must be contained in the I'm considering this issue as resolved by a configuration change. Here's your example.zip with a custom logo. |
Thanks. I'm not sure that I would agree that this is resolved by config change. When using I am trying to use |
As said, |
Hmm, okay, so to clarify: you're right that the behavior is different, as |
Fixed, thanks to the awesome work of @kamilkrzyskow! |
9.1.9 is out, including the changes referenced in this issue! 🚀 |
Context
No response
Bug description
When mkdocs-material is configured with a custom icon set and the social plugin, the social plugin looks in the wrong place for the icon.
mkdocs.yml
Related links
Similar to Issue 4812, except in my case, a custom icon set is being used instead of a custom image.
Reproduction
Note: I have commented out the
custom_dir
in the reproduction so that the info plugin would run. This customization is mentioned in the logo and icons documentation that I referenced.example.zip
Steps to reproduce
theme.custom_dir
in mkdocs.ymlmkdocs build
ormkdocs serve
FileNotFoundError: [Errno 2] No such file or directory: '/Users/bz/dev/mkdocs-test/venv/lib/python3.10/site-packages/material/.icons/iconset1/myicon.svg'
Browser
Chrome
Before submitting
The text was updated successfully, but these errors were encountered: