Skip to content
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

Docs suggestion: use icon for current page favicon #1321

Open
coliff opened this issue May 18, 2022 · 0 comments
Open

Docs suggestion: use icon for current page favicon #1321

coliff opened this issue May 18, 2022 · 0 comments
Labels
docs Improvements or additions to documentation enhancement New feature or request

Comments

@coliff
Copy link
Contributor

coliff commented May 18, 2022

Could be neat to use the current icon as the SVG favicon. Useful if you have lots of tabs open.

image

The code I used for the above quick test was adding this to the favicons.html partial:

{{ if not .IsHome }}
<link rel="icon" href="/assets/icons/ {{- .Title | urlize -}}.svg" sizes="all" type="image/svg+xml">
{{ end }}

but it needs a bit more work - right now the favicon.ico is loading instead. I think <link rel="icon" href="/assets/img/favicons/favicon.ico"> can be safely removed anyway if there is a favicon.ico in the sites root.

I like the idea of implementing this but there are a few things to note/potential issues.

  • The icon appears black so doesn't look great with dark themes. could potentially use media query on the icon and CSS to invert it or something?
  • Safari doesn't support SVG favicons still :-( (but will fallback to Bootstrap 'B' icon PNG.
@XhmikosR XhmikosR added docs Improvements or additions to documentation enhancement New feature or request labels Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants