fix(docs): add the $W favicon and serve it under /docs#243
Merged
Conversation
The favicon <link> tags and the web manifest referenced /docs/favicon.* via buildDocsPath, but top-level public/ files are served from the site root, not under the /docs base. Those /docs/favicon.* URLs 404'd, so the docs site rendered with no favicon. Point the icon/apple-touch-icon/shortcut-icon/manifest links and the manifest's icon srcs at root-absolute paths (/favicon.svg, /favicon.ico, /apple-touch-icon.png, /site.webmanifest, ...), which all resolve (200) and match the main superwall.com favicon. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LuRF2wVQFGW44g9mSTJR9D
Replaces the earlier root-path approach: instead of pointing the icon links at superwall.com's shared root favicon, serve the docs site's own orange "$W" mark from the docs Cloudflare Worker under /docs/*. Root cause: the <link> tags referenced /docs/favicon.* (via buildDocsPath), but the favicon assets only lived at public/ root, which the build emits to the site root. The docs worker only serves assets under /docs/*, so /docs/favicon.* 404'd and the site had no favicon. - Replace favicon assets with the "$W" docs mark: favicon.ico (16/32/48), favicon-96x96/-192/-512.png, apple-touch-icon.png (180), and favicon.svg (an SVG wrapper embedding the 512px PNG, since the source art is raster — keeps the existing svg <link> working). - Mirror the favicon/manifest set into public/docs/ at build time in scripts/copy-docs-images.cjs (same pattern already used for resources/ and images/), so they emit to dist/client/docs/favicon.* and resolve at /docs/favicon.*. - Restore the __root.tsx links and site.webmanifest icon srcs to the /docs base (buildDocsPath). Verified: `vite build` emits the new assets to dist/client/docs/favicon.*. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LuRF2wVQFGW44g9mSTJR9D
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
superwall-docs | 8865302 | Commit Preview URL Branch Preview URL |
Jul 08 2026, 07:06 PM |
Regenerate favicon asset set from the new teal-on-dark-green $W source PNG (96/192/512 PNGs, 180 apple-touch-icon, multi-size ICO 16/32/48, and the SVG wrapper embedding the 512 PNG). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LuRF2wVQFGW44g9mSTJR9D
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.
Requested by Nick Godwin, Jake Mor · Slack thread
Before: the docs site (superwall.com/docs) rendered with no favicon at all.
After: it shows Superwall's orange "$W" docs mark.
The
<link>tags reference/docs/favicon.*(viabuildDocsPath), but the favicon assets only lived atpublic/root, which the build emits to the site root. The docs Cloudflare Worker only serves assets under/docs/*, so every/docs/favicon.*URL 404'd (verified on prod:/docs/favicon.svg→ 404,/favicon.svg→ 200 from the main site).How:
favicon.ico(16/32/48),favicon-96x96/-192/-512.png,apple-touch-icon.png(180), andfavicon.svg(an SVG wrapper embedding the 512px PNG, since the source art is raster).public/docs/at build time inscripts/copy-docs-images.cjs(the same pattern already used forresources/and images), so they emit todist/client/docs/favicon.*and resolve at/docs/favicon.*from the docs Worker — its own icon, not superwall.com's root favicon.Verified locally:
vite buildemits the new assets todist/client/docs/favicon.*. End-to-end runtime check to follow from the Cloudflare preview deploy.Note for the reviewer: the branch carries an earlier superseded commit (a root-path approach) below the final commit that reverts it — the cumulative diff vs
mainis the correct final state, so please squash-merge.Generated by Claude Code