site: declare the full icon set on every page, add alpha to the 128px favicon - #46
Merged
Merged
Conversation
… favicon Ten pages declared only the 128px PNG icon and fell back to a stale favicon.ico on two more, so most of the site rendered an opaque tile in the browser tab while the home page alone showed the transparent logo. Every page listed in sitemap.xml now declares the same set - the SVG icon, all three PNG sizes, and apple-touch - sourced from one canonical partial at assets/inc/favicon-links.html so the declaration has a single copy to keep in sync, even though the site has no build step to include it at serve time. favicon-128.png is regenerated from the SVG source with a transparent background (RGBA) instead of the opaque RGB it shipped as. apple-touch-icon.png is left untouched - iOS composites transparency to black, so opaque is correct there. A new CI check reads the partial and sitemap.xml, asserts every page declares the identical set, and asserts every icon PNG carries an alpha channel. It self-tests against a fixture page with no icon declarations and an unreadable path before trusting its verdict on the real pages.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
One shared icon declaration. Ten pages declared only the 128px PNG icon and two more (the quickstart redirect stubs) declared none at all, falling back to
favicon.ico. Only the home page in each language declared the full set. Every page listed insitemap.xmlnow declares the same five links - the SVG icon, all three PNG sizes, and apple-touch - copied from one canonical source atassets/inc/favicon-links.html. The site has no build step to include a partial at serve time, so a new CI check is what keeps every page's copy identical to it rather than a runtime include.favicon-128.pngnow carries an alpha channel. It shipped as opaque RGB (colour type 2), so the ten pages that only declared it rendered a solid tile in the browser tab instead of the transparent logo the SVG and the other two PNG sizes show. Regenerated from the SVG source as RGBA (colour type 6).apple-touch-icon.pngis untouched - iOS composites transparency to black, so opaque is correct there.A new CI workflow (
icon-declarations.yml) readssitemap.xml, maps each URL to its file, and asserts the file contains every line from the partial plus exactly 4rel="icon"links and 1 apple-touch link. Separately it checks that every PNG referenced by arel="icon"link has colour type 4 or 6. Before trusting either verdict it self-tests against a fixture page with no icon declarations and an unreadable path, confirming both fail the check rather than reporting OK.Verified, not assumed
grep -c 'rel="icon"'= 4,grep -c 'apple-touch-icon'= 1.favicon-128.pngIHDR colour type is 6 (was 2);favicon-16.png/favicon-32.pngunchanged at 6;apple-touch-icon.pngunchanged.