Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: favicon markup#2115

Merged
knadh merged 1 commit intoknadh:masterfrom
salim-b:favicon-tweak
Oct 29, 2024
Merged

fix: favicon markup#2115
knadh merged 1 commit intoknadh:masterfrom
salim-b:favicon-tweak

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
@salim-b salim-b deleted the favicon-tweak branch October 29, 2024 20:51
ai-armageddon pushed a commit to Twitter-outreach/ListMonk that referenced this pull request Mar 11, 2025
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