Skip to content

fix: generate favicon set (was 5 dead refs → 404 on every site)#3

Merged
ProfessorManhattan merged 3 commits into
mainfrom
feat/generate-favicons
Jun 24, 2026
Merged

fix: generate favicon set (was 5 dead refs → 404 on every site)#3
ProfessorManhattan merged 3 commits into
mainfrom
feat/generate-favicons

Conversation

@ProfessorManhattan

Copy link
Copy Markdown
Contributor

Bug (caught by validate-assets in #1)

index.html referenced 5 favicons (favicon.ico, favicon-16/32.png, apple-touch-icon.png, safari-pinned-tab.svg) that don't exist in public/ → every cloned site shipped 404'd favicons (checklist #23 violation).

Fix (zero deps, verified)

scripts/generate-favicons.mjs generates the full set, brand-colored from _brand.json (brandHue → HSL→RGB), using only node:zlib — real RGBA PNGs (rounded square) + a PNG-in-ICO + SVG (brand bg + business initial) + safari mask. Wired into prebuild (regenerates per brand; vite copies public/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

Brian Zalewski and others added 3 commits June 20, 2026 23:52
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>
@ProfessorManhattan ProfessorManhattan merged commit 1d938f0 into main Jun 24, 2026
ProfessorManhattan pushed a commit that referenced this pull request Jun 25, 2026
* origin/main:
  fix: generate the favicon set (was 5 dead refs → 404 on every site) (#3)
  feat: build-gate validators (enforce the completeness checklist + caught a favicon bug) (#1)

# Conflicts:
#	package.json
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