Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates static asset references to be base-path-safe (for deployments under a non-root baseURL, such as GitHub Pages project sites) by replacing hardcoded root-relative URLs with relURL or relative paths.
Changes:
- Added
relURL-based font preload links and introduced a:rootinline style intended to provide base-path-safe font URLs. - Updated footer image
srcattributes to userelURL. - Switched the home page logo
srcto a relative path and updated CI cache actions toactions/cache@v5.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| layouts/partials/hooks/head-end.html | Adds relURL for font preloads and introduces CSS custom properties for font URLs. |
| layouts/partials/footer.html | Replaces root-relative image paths with relURL. |
| content/en/_index.html | Switches the homepage logo image path to a relative URL. |
| assets/scss/_variables_project.scss | Changes @font-face src entries to reference CSS custom properties. |
| AGENTS.md | Documents the repo convention to prefer base-path-safe asset references. |
| .github/workflows/gh-pages.yml | Bumps cache restore/save actions to v5. |
| local("PublicSans-Light"), | ||
| url("/fonts/public-sans/public-sans-latin-300-normal.woff2") format("woff2"); | ||
| var(--omf-public-sans-300-src); | ||
| } |
There was a problem hiding this comment.
Fixed in the latest commit. The @font-face blocks that used var(...) in their src descriptors have been removed from _variables_project.scss. The complete @font-face rules now live in layouts/partials/hooks/head-end.html where Hugo's relURL emits the final font URLs directly.
| :root { | ||
| --omf-public-sans-300-src: url("{{ "fonts/public-sans/public-sans-latin-300-normal.woff2" | relURL }}") format("woff2"); | ||
| --omf-public-sans-400-src: url("{{ "fonts/public-sans/public-sans-latin-400-normal.woff2" | relURL }}") format("woff2"); | ||
| --omf-public-sans-600-src: url("{{ "fonts/public-sans/public-sans-latin-600-normal.woff2" | relURL }}") format("woff2"); | ||
| --omf-source-serif-4-400-src: url("{{ "fonts/source-serif-4/source-serif-4-latin-400-normal.woff2" | relURL }}") format("woff2"); | ||
| --omf-source-serif-4-600-src: url("{{ "fonts/source-serif-4/source-serif-4-latin-600-normal.woff2" | relURL }}") format("woff2"); | ||
| --omf-source-serif-4-700-src: url("{{ "fonts/source-serif-4/source-serif-4-latin-700-normal.woff2" | relURL }}") format("woff2"); | ||
| --omf-ibm-plex-mono-400-src: url("{{ "fonts/ibm-plex-mono/ibm-plex-mono-latin-400-normal.woff2" | relURL }}") format("woff2"); | ||
| --omf-ibm-plex-mono-500-src: url("{{ "fonts/ibm-plex-mono/ibm-plex-mono-latin-500-normal.woff2" | relURL }}") format("woff2"); | ||
| --omf-ibm-plex-mono-600-src: url("{{ "fonts/ibm-plex-mono/ibm-plex-mono-latin-600-normal.woff2" | relURL }}") format("woff2"); | ||
| } |
There was a problem hiding this comment.
Fixed in the latest commit. The :root CSS custom property block has been replaced with complete @font-face rules in this partial, using relURL directly for each font file URL.
@font-facerules intohead-end.htmlusingrelURL@font-faceblocks (usingvar(...)) from_variables_project.scss