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

fix: favicon markup #2115

Merged
merged 1 commit into from
Oct 29, 2024
Merged

fix: favicon markup #2115

merged 1 commit into from
Oct 29, 2024

Conversation

salim-b
Copy link
Contributor

@salim-b salim-b commented Oct 28, 2024

Changes

  • Removed rel="shortcut" because

    The shortcut link type is often seen before icon, but this link type is non-conforming, ignored and web authors must not use it anymore.

  • Corrected media type for PNG favicons.

Nice to have

For a custom favicon we currently always set type="image/x-icon" which is a media type for ICO files.

Instead, I'd like to change the template to infer the media type from the actually provided file's extension, but I think this is impossible with only the functions built into the html/template package and we'd have to first define suitable string manipulation functions (like exposing strings.Split or just filepath.Ext) via template.FuncMap.

If you'd welcome this and provide me some guidance on where exactly I'd need to add this, I'd be happy to extend this PR accordingly or submit another one.

@knadh knadh merged commit 599147c into knadh:master Oct 29, 2024
1 check passed
@salim-b salim-b deleted the favicon-tweak branch October 29, 2024 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants