Skip to content

site: declare the full icon set on every page, add alpha to the 128px favicon - #46

Merged
transitrix merged 1 commit into
mainfrom
transitrix-site/73-icon-favicon-declarations
Aug 8, 2026
Merged

site: declare the full icon set on every page, add alpha to the 128px favicon#46
transitrix merged 1 commit into
mainfrom
transitrix-site/73-icon-favicon-declarations

Conversation

@transitrix

Copy link
Copy Markdown
Owner

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 in sitemap.xml now declares the same five links - the SVG icon, all three PNG sizes, and apple-touch - copied from one canonical source at assets/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.png now 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.png is untouched - iOS composites transparency to black, so opaque is correct there.

A new CI workflow (icon-declarations.yml) reads sitemap.xml, maps each URL to its file, and asserts the file contains every line from the partial plus exactly 4 rel="icon" links and 1 apple-touch link. Separately it checks that every PNG referenced by a rel="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

  • All 14 sitemap pages: grep -c 'rel="icon"' = 4, grep -c 'apple-touch-icon' = 1.
  • favicon-128.png IHDR colour type is 6 (was 2); favicon-16.png/favicon-32.png unchanged at 6; apple-touch-icon.png unchanged.
  • The new check script run locally against the full tree: passes on all 14 pages, and its two self-tests (missing declarations, unreadable file) both correctly fail before the real pass runs.
  • The repository's public-surface guard patterns checked locally over every changed and added file - clean.

… 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.
@transitrix
transitrix merged commit 70ff711 into main Aug 8, 2026
5 checks passed
@transitrix
transitrix deleted the transitrix-site/73-icon-favicon-declarations branch August 8, 2026 06:46
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.

1 participant