Skip to content

HDDS-16234. Favicon missing on all non-root pages - #534

Open
shuan1026 wants to merge 1 commit into
apache:masterfrom
shuan1026:HDDS-16234
Open

HDDS-16234. Favicon missing on all non-root pages#534
shuan1026 wants to merge 1 commit into
apache:masterfrom
shuan1026:HDDS-16234

Conversation

@shuan1026

@shuan1026 shuan1026 commented Aug 20, 2026

Copy link
Copy Markdown

What changes were proposed in this pull request?

The favicon <link> tags in docusaurus.config.js's headTags used relative href values (e.g. href: 'favicon.ico') with no leading /. Since there's no <base> tag on the page, browsers resolve these relative to the current page URL rather than the site root. This only happened to work on / (resolves to /favicon.ico, 200); on any other page it resolved to a nested, non-existent path (e.g. /blog/favicon.ico, 404), so the favicon failed to load on every non-root page (docs, blog, roadmap, etc.).

This PR makes the three headTags favicon entries build their href from the site's baseUrl instead of hardcoding a bare relative path, so they always resolve to the site root regardless of page depth.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-16234

How was this patch tested?

Reproduced the bug first, then verified the fix, using docker compose

  • Before the fix, curl against /, /docs/.../ozone-manager/, and /blog/ all emitted the same relative href="favicon.ico" markup, but the resolved nested path (e.g. /docs/.../ozone-manager/favicon.ico) returned 404 while the root path returned 200 — confirming the bug.
  • After the fix, the same three pages emit href="/favicon.ico" (and favicon.svg, apple-touch-icon.png), which all resolve to 200 regardless of page depth.

Before the fix:
before fix

After the fix:
after fix

@jojochuang

Copy link
Copy Markdown
Contributor

@shuan1026 thanks for the report. Please consider including a screenshot in the future.

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.

2 participants