fix: generate favicon set (was 5 dead refs → 404 on every site)#3
Merged
Conversation
index.html referenced favicon.ico, favicon-16/32.png, apple-touch-icon.png, safari-pinned- tab.svg — none existed in public/ (caught by validate-assets, PR #1). Every cloned site shipped 404'd favicons (violates checklist #23). scripts/generate-favicons.mjs generates the full set brand-colored from _brand.json (brandHue → HSL→RGB) with ZERO external deps — pure node:zlib for valid RGBA PNGs (rounded square), a BMP/PNG-in-ICO writer, and SVG (rich, brand bg + business initial) + safari mask. Wired into prebuild so it regenerates per brand and vite copies public/ → dist/. Also added an SVG-favicon <link> (modern browsers). Committed brand-default placeholders so the repo is clean even before a per-brand rebuild. Verified on a clean build: all 6 favicons land in dist/, 0 dead refs, valid PNG/ICO magic bytes. validate-assets (PR #1) now passes the favicon gate. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Bug (caught by validate-assets in #1)
index.htmlreferenced 5 favicons (favicon.ico,favicon-16/32.png,apple-touch-icon.png,safari-pinned-tab.svg) that don't exist inpublic/→ every cloned site shipped 404'd favicons (checklist #23 violation).Fix (zero deps, verified)
scripts/generate-favicons.mjsgenerates the full set, brand-colored from_brand.json(brandHue→ HSL→RGB), using onlynode:zlib— real RGBA PNGs (rounded square) + a PNG-in-ICO + SVG (brand bg + business initial) + safari mask. Wired intoprebuild(regenerates per brand; vite copiespublic/→dist/). Added an SVG-favicon<link>for modern browsers.Verified on a clean build: all 6 favicons land in
dist/, 0 dead refs, valid PNG/ICO magic bytes.validate-assets(#1) now passes the favicon gate. Brand-default placeholders committed so the repo is clean even pre-rebuild.🤖 Generated with Claude Code