fix(docs): fix font 404 on GitHub Pages (../../fonts/ path in custom.css)

Hextra's production build bundles assets/css/custom.css into
css/compiled/main.css. The original '../fonts/' relative path resolved
correctly from css/custom.css (dev) but landed at css/fonts/ in
production — one directory too deep.

Fix: use '../../fonts/' so the URL resolves correctly from every
output location browsers may encounter:

  dev:        /css/custom.css              → ../../fonts/ → /fonts/
  production: /css/compiled/main.css       → ../../fonts/ → /fonts/
  GH Pages:   /Bose-SoundTouch/css/compiled/main.css
                                           → ../../fonts/ → /Bose-SoundTouch/fonts/

Browsers clamp traversal at the origin root, so going two levels up
from /css/custom.css still reaches /fonts/ — safe in dev, correct in
production.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Tobias Gesellchen
2026-05-26 23:19:04 +02:00
co-authored by Claude Sonnet 4.6
parent aafc5ba3f9
commit 93bc04b334
+11 -4
View File
@@ -1,9 +1,16 @@
/* Font paths use ../../fonts/ (two levels up) so the URL resolves correctly
regardless of where the CSS is served from:
- dev: /css/custom.css → ../../fonts/ → /fonts/
- production: /css/compiled/main.css → ../../fonts/ → /fonts/
- GH Pages: /Bose-SoundTouch/css/compiled/main.css
→ ../../fonts/ → /Bose-SoundTouch/fonts/ */
@font-face {
font-family: 'Noto Sans';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('../fonts/noto-sans-v42-latin-regular.woff2') format('woff2');
src: url('../../fonts/noto-sans-v42-latin-regular.woff2') format('woff2');
}
@font-face {
@@ -11,7 +18,7 @@
font-style: italic;
font-weight: 400;
font-display: swap;
src: url('../fonts/noto-sans-v42-latin-italic.woff2') format('woff2');
src: url('../../fonts/noto-sans-v42-latin-italic.woff2') format('woff2');
}
@font-face {
@@ -19,7 +26,7 @@
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('../fonts/noto-sans-v42-latin-700.woff2') format('woff2');
src: url('../../fonts/noto-sans-v42-latin-700.woff2') format('woff2');
}
@font-face {
@@ -27,7 +34,7 @@
font-style: italic;
font-weight: 700;
font-display: swap;
src: url('../fonts/noto-sans-v42-latin-700italic.woff2') format('woff2');
src: url('../../fonts/noto-sans-v42-latin-700italic.woff2') format('woff2');
}
:root {