shuan1026 opened a new pull request, #534:
URL: https://github.com/apache/ozone-site/pull/534

   ## 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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to