Skip to content

[GH-1496] Fix website favicon checker issues#2771

Open
piyushka-ally wants to merge 4 commits intoapache:masterfrom
piyushka-ally:gh-1496-fix-favicon-checker
Open

[GH-1496] Fix website favicon checker issues#2771
piyushka-ally wants to merge 4 commits intoapache:masterfrom
piyushka-ally:gh-1496-fix-favicon-checker

Conversation

@piyushka-ally
Copy link

Did you read the Contributor Guide?

Is this PR related to a ticket?

What changes were proposed in this PR?

The Sedona documentation website failed basic favicon validation (e.g. Real Favicon Generator checker) because it only had a single PNG favicon with no supporting assets or HTML meta tags.

This PR adds all assets and tags required by modern browsers, iOS, Android, Windows, and Safari:

  • scripts/generate_favicons.py — new script that generates all favicon assets from docs/image/sedona_logo_symbol.png using Pillow. Includes alpha-channel tracing to produce a monochrome SVG for Safari pinned tabs.
  • Makefile — new genfavicons target; pillow added to the docs dependency group in pyproject.toml.
  • Generated and committed to docs/: favicon.ico (16×16, 32×32, 48×48), favicon-16x16.png, favicon-32x32.png, apple-touch-icon.png (180×180), mstile-150x150.png, android-chrome-192x192.png, android-chrome-512x512.png, safari-pinned-tab.svg, site.webmanifest, browserconfig.xml.
  • docs-overrides/main.html — adds <link> and <meta> tags for apple-touch-icon, PNG favicon sizes, web manifest, Safari mask-icon, msapplication tile, and theme-color. Uses the MkDocs | url filter for correct relative paths under mike versioning.
  • mkdocs.yml — changes favicon: to point to favicon.ico.

To regenerate assets after a logo change: make genfavicons, then commit the output.

How was this patch tested?

  • Verified all generated PNG dimensions and ICO frame sizes programmatically (16×16, 32×32, 48×48 in the ICO; correct pixel dimensions for all PNGs).
  • Confirmed safari-pinned-tab.svg is valid XML with viewBox="0 0 100 100" and monochrome fill="#000000".
  • Confirmed site.webmanifest is valid JSON with relative icon paths (compatible with mike versioning).
  • Confirmed browserconfig.xml is valid XML.
  • Verified all HTML meta/link tags are present in the extrahead block.
  • Checked all text files pass pre-commit rules: correct Apache license header format, no trailing whitespace, final newlines, line lengths within Black's 88-char limit.

Did this PR include necessary documentation updates?

  • No, this PR does not affect any public API so no need to change the documentation.

Add all favicon assets required by Real Favicon Generator and modern
browsers, fixing the validation failures reported in apacheGH-1496.

Changes:
- Add scripts/generate_favicons.py to generate all favicon assets from
  docs/image/sedona_logo_symbol.png using Pillow; includes a
  generate_safari_pinned_tab_svg() that traces the logo alpha channel
  into a monochrome SVG suitable for Safari mask-icon
- Add Makefile `genfavicons` target (depends on docsinstall) and add
  pillow to the docs dependency group so the script is self-contained
- Generate and commit all favicon assets to docs/:
  favicon.ico (16x16, 32x32, 48x48), favicon-16x16.png,
  favicon-32x32.png, apple-touch-icon.png (180x180),
  mstile-150x150.png, android-chrome-192x192.png,
  android-chrome-512x512.png, safari-pinned-tab.svg,
  site.webmanifest, browserconfig.xml
- Update docs-overrides/main.html extrahead block with apple-touch-icon,
  favicon PNG sizes, web manifest, mask-icon, msapplication, and
  theme-color meta tags using MkDocs `| url` filter for correct relative
  paths under mike versioning
- Change mkdocs.yml favicon to favicon.ico

Co-authored-by: Isaac
@jbampton jbampton added docs python Pull requests that update Python code root labels Mar 20, 2026
Looks good

Co-authored-by: John Bampton <jbampton@users.noreply.github.com>
Copy link
Member

@jbampton jbampton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should store all the small files except the favicon.ico that you have in the docs directory in a separate sub folder.

To ensure maximum compatibility, especially with older browsers the favicon.ico should be in the root so that seems correct

Keep favicon.ico at the docs root for maximum browser compatibility
(browsers request /favicon.ico automatically). All other assets —
PNGs, SVG, site.webmanifest, and browserconfig.xml — are moved to
docs/favicons/ to avoid cluttering the docs root.

Update docs-overrides/main.html and scripts/generate_favicons.py to
reflect the new paths.

Co-authored-by: Isaac
@piyushka-ally
Copy link
Author

I have made the requested change. Please review and approve. Thanks.

@piyushka-ally piyushka-ally requested a review from jbampton March 21, 2026 05:26
Run oxipng --fix -o 4 --strip safe --alpha on all favicon PNGs to pass
the pre-commit oxipng manual hook. Sizes reduced 6–33%.

Co-authored-by: Isaac
@piyushka-ally
Copy link
Author

Looks like all checks have passed, can you please check and approve. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs python Pull requests that update Python code root

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sedona website favicon checker issues and missing files

2 participants