Skip to content

Remove default theme favicons and modernize docsy.dev's icons#2653

Merged
chalin merged 11 commits into
google:mainfrom
chalin:chalin-m24-no-favicons-2026-0613
Jun 14, 2026
Merged

Remove default theme favicons and modernize docsy.dev's icons#2653
chalin merged 11 commits into
google:mainfrom
chalin:chalin-m24-no-favicons-2026-0613

Conversation

@chalin

@chalin chalin commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator
  • Fixes Theme should not have default favicons #2595: removes the theme's bundled icon set, so sites no longer override ~25 default files to change icons
  • Contributes to Improve favicon support, in particular for light/dark mode #2357: publishes docsy.dev's icons at the site root (where browsers probe) and adds an SVG favicon with prefers-color-scheme light/dark support
  • Modernizes docsy.dev's <head> links to the standard set (an icon .ico + .svg, one apple-touch-icon); drops shortcut icon, android-* density, and unused pwa-*/tile* assets; no manifest
  • Adds a golden snapshot test pinning the favicon <head> links
  • Documents the breaking change in the changelog and updates the user guide

chalin added 3 commits June 13, 2026 16:39
- Adds golden-file tests for favicon/app-icon/manifest `<head>` links so unintended theme changes surface as a diff
- Reorganizes `test:base`/`test:extra` so the site builds once before format, link-check, and downstream golden tests
- Documents lean code and test conventions in AGENTS.md
- Contributes to google#2595
- Moves the bundled icon set from `theme/static/favicons` to `docsy.dev/static/favicons` so the theme ships no default favicons
- Empties `theme/_partials/favicons.html` to a documented override hook; `head.html` still includes it as the override point
- Adds a docsy.dev `_partials/favicons.html` override with the existing links so the built site is unchanged
- Updates the user guide: the theme provides no default favicons; sites add their own and override the partial
- Contributes to google#2357
- Adds a hand-built `favicon.svg` (from the Docsy logo) with a `prefers-color-scheme` border tweak for light/dark support
- Regenerates `favicon.ico` (16/32/48) and an opaque `apple-touch-icon.png` (180x180) from the SVG for a unified flat look
- Publishes icons at the site root, where browsers probe for them, instead of under `/favicons/`
- Trims the `<head>` links to the modern set: drops `shortcut icon`, the `android-*` density icons, and unused `pwa-*`/`tile*` assets; no Web App Manifest
- Updates the favicon golden and the user-guide note accordingly
- Contributes to google#2595
- Adds a concise UNRELEASED breaking-change changelog entry for the removal of the theme's default favicons, linking the user guide for details
- Drops now-unused cSpell ignore words (`Icongen`, `icongen`, `cthedot`) from the icons-and-images guide
@chalin chalin force-pushed the chalin-m24-no-favicons-2026-0613 branch from cba9e23 to 7463c61 Compare June 13, 2026 21:53
chalin added 7 commits June 13, 2026 18:52
- Contributes to google#2595
- Adds a theme-level regression test that builds a throwaway site against the theme and asserts it emits no favicon links without a site override, pinning the no-default-favicons behavior
- Asserts a linked favicon asset exists in the build output, so a missing file is caught alongside the head-link golden
- Adds a minimal `favicons.html` example to the user guide to ease migration for sites that relied on the theme defaults
- Refreshes the link-checker cache for the newly referenced PR
- Contributes to google#2595
- Reverts `precheck:links` to `build` so a standalone `npm run check:links` rebuilds with the localhost baseURL as on `main`, rather than the production default that htmltest would treat as external links
- Leaves the test flow unaffected: it invokes `_check:links` directly, so the `precheck:links` hook never fires and no extra build is introduced
- Contributes to google#2595
- Switches the user-guide `favicons.html` example to Hugo `relURL` so the links stay correct on sites whose `baseURL` includes a subpath, rather than teaching a root-only pattern
- Fixes the `build (ubuntu-latest)` failure where the throwaway theme build could not resolve the theme's Hugo module imports (Bootstrap, Font Awesome) with no module cache
- Runs the existing `scripts/mkdirp-hugo-mod.js` helper in a `before` hook to create the empty placeholder module directories under the themes dir, mirroring the repo postinstall used for non-module consumers
- Parametrizes the throwaway-site helper with a `baseURL` so tests can exercise subpath deployments
- Verifies the user guide's `relURL` recommendation: favicon `<link>` hrefs pick up the `baseURL` subpath prefix
- Builds the favicon theme-defaults test's `PATH` with `path.delimiter` instead of a hard-coded `:`, so it stays correct for contributors running the tests on Windows
- Loops `faviconHrefs()` in the smoke test so a missing `favicon.svg` or `apple-touch-icon.png` is caught, not just `favicon.ico`
@chalin chalin added this to the 0.16.0 milestone Jun 13, 2026
@chalin chalin merged commit acf3453 into google:main Jun 14, 2026
16 checks passed
@chalin chalin deleted the chalin-m24-no-favicons-2026-0613 branch June 14, 2026 00:03
chalin added a commit to chalin/docsy-example that referenced this pull request Jun 14, 2026
- Contributes to google/docsy#2357
- Adds `favicon.svg`, `favicon.ico`, and `apple-touch-icon.png` under `static/` so the Docsy theme's default favicons partial discovers and links them; the example lost its favicon when google/docsy#2653 dropped the theme's bundled defaults
- Reuses docsy.dev's favicon assets verbatim -- all three files are byte-identical to docsy.dev's so the example provably uses the same Docsy-logo artwork it already shows in its navbar
- Bumps the Docsy theme module to a commit that includes the discovery partial (google/docsy#2654)
- Adds `tests/favicons.test.mjs` asserting the three discovered `<link>`s render in the built home page
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.

Theme should not have default favicons

1 participant