fix: add multi-format favicons for consistent display on all pages - #271
Open
christy-dev4 wants to merge 1 commit into
Open
fix: add multi-format favicons for consistent display on all pages#271christy-dev4 wants to merge 1 commit into
christy-dev4 wants to merge 1 commit into
Conversation
…idoko257#223) Root cause: favicon field pointed to logo.svg which is silently ignored by Safari (all versions), iOS, Windows taskbar, and older browsers. No .ico or .png fallback files existed. Changes: - Add static/img/favicon.ico (16/32/48 px multi-resolution ICO) - Add static/img/favicon-32x32.png (32x32 RGBA PNG) - Add static/img/favicon-16x16.png (16x16 RGBA PNG) - Add static/img/apple-touch-icon.png (180x180 RGBA PNG for iOS/macOS) - Update docusaurus.config.ts: - favicon field: 'img/logo.svg' → 'img/favicon.ico' - Add headTags with 5 <link> tags covering ico, png-32, png-16, apple-touch-icon, and svg for complete cross-browser coverage Browser resolution order: svg (Chrome/Firefox) → png-32 → png-16 → ico (IE/legacy) → apple-touch-icon (iOS/macOS bookmarks) closes Pidoko257#223
|
@christy-dev4 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Fix Missing Favicon on All Pages
Summary
The ProxyPay docs portal had no visible favicon in browser tabs, bookmarks, or on
mobile home screens. The root cause was two-fold:
Wrong format —
faviconwas set toimg/logo.svg. Many browsers (older Chrome,all versions of Safari on iOS/macOS, Windows taskbar/pinned-sites, and every version
of IE/Edge Legacy) do not support SVG as a favicon source. They silently ignore the
tag and display a generic blank icon.
Missing fallback files — No
.icoor.pngfavicon files existed in the repo,so browsers that support only those formats had nothing to fall back to.
favicon.ico(16 + 32 + 48 px) served via<link rel="icon" type="image/x-icon">headTagsinjects into every page's<head>globallyapple-touch-icon.png(180×180) for iOS/macOS;.icofor WindowsRoot Cause
Browsers select a favicon using
<link rel="icon">tags in the document<head>.Docusaurus only injects one tag from the
faviconconfig key. SVG icons are specifiedin the WHATWG standard but browser support
is incomplete:
.ico.png.svgWithout an
.icoor.pngfallback, Safari users (desktop and mobile) and anyonesaving the site on Windows see no favicon at all.
Changes
static/img/favicon.ico(new)A multi-resolution ICO file containing three embedded PNG streams:
Each frame renders the ProxyPay brand mark: a green rounded square
(
#2e8555) with a white ₿ glyph — matchinglogo.svg.static/img/favicon-32x32.png(new)Standalone 32×32 RGBA PNG. Used by the
<link sizes="32x32">tag, which modernbrowsers (Chrome, Firefox, Edge) prefer over
.icowhen both are present.static/img/favicon-16x16.png(new)Standalone 16×16 RGBA PNG. Fallback for environments that request small icons
explicitly.
static/img/apple-touch-icon.png(new)180×180 RGBA PNG. Required by iOS Safari and macOS for:
docusaurus.config.tsTwo targeted changes:
1.
faviconfield — changed from SVG to ICO so the automatically injected<link rel="shortcut icon">tag points at a universally supported format:2.
headTagsarray — five additional<link>tags injected into every page<head>, giving browsers a full priority list to choose from:The browser resolution order is:
image/svg+xmlif it supports SVG icons (Chrome 80+, Firefox 41+).image/pngsized32x32or16x16for everything else.image/x-iconas the universal last resort (IE, old Android).apple-touch-iconwhen triggered by iOS/macOS bookmark actions.How to verify
Dev server (visual check)
Check
<head>tagsOpen DevTools → Elements →
<head>. You should see all five<link>tags:No 404s
Open DevTools → Network → filter by
favicon— all five requests should return200 OKwith appropriateContent-Typeheaders.All pages
Navigate between
/and/api— the favicon should persist on both pages(Docusaurus injects
headTagsglobally, so this is guaranteed).Notes
ProgressPluginbuild warning is unrelated to this PR(present on the base branch before these changes).
static/img/following the existing project convention for
logo.svg.closes #223