-
Notifications
You must be signed in to change notification settings - Fork 336
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
More flexible favicons #2591
Comments
Looks like only supported by ~77% of browsers (https://caniuse.com/link-icon-svg), so wouldn't want to make this the default, but maybe if you have an svg logo we could add it as an extra link? https://dev.to/masakudamatsu/favicon-nightmare-how-to-maintain-sanity-3al7 suggests that dark mode support for svg requires custom css in the svg, which I suspect few folks will know how to do. |
So I don't think it makes sense to do this by default, but it would certainly be nice to give folks the ability to opt-in to an svg favicon. I think the main question on my mind is whether this needs to be an option, or if we could just have a convention for where such a file would be located. For example, maybe if |
I think it's a good idea to conditionally include the line depending on whether an SVG favicon (pkgdown/favicon.svg) exists. I will take care of the implementation and submit a PR. |
Yes, that's true. However, https://realfavicongenerator.net/ offers not only its API but also a simple tool to create SVG favicons optimized for both dark and light mode.
When Apple (Safari) supports it, I will get back to you regarding the default behavior. Being able to work independently of the resolution is definitely an advantage, even without special features (e.g. dark mode support). |
@MEO265 thanks for working on this! |
I think this was addressed in #2804 but please reopen if you still have an issue. |
I have two points that could work together. I'm willing to create a PR, but I would like to know in advance what you think is the best option or whether the feature is not wanted at all.
First of all, I would really like to see support for svg favicons. All you would have to do is insert a line in the header above the other icons if the logo is an svg.
<link rel="icon" type="image/svg+xml" href="favicon.svg">
This would allow (monochrome) logos to also have a variant for dark mode users.
Additionally or alternatively, you could use the yamel to allow the code embedded in the header for the favicon to be overwritten.
The text was updated successfully, but these errors were encountered: