Remove default theme favicons and modernize docsy.dev's icons#2653
Merged
Conversation
- 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
11 tasks
- 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
cba9e23 to
7463c61
Compare
- 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`
This was referenced Jun 14, 2026
Merged
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
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.
prefers-color-schemelight/dark support<head>links to the standard set (anicon.ico+.svg, oneapple-touch-icon); dropsshortcut icon,android-*density, and unusedpwa-*/tile*assets; no manifest<head>links