Skip to content

fix: switch to relative urls#500

Merged
alee merged 2 commits into
developfrom
fix_paths
May 23, 2026
Merged

fix: switch to relative urls#500
alee merged 2 commits into
developfrom
fix_paths

Conversation

@alee
Copy link
Copy Markdown
Member

@alee alee commented May 23, 2026

  • Explore files and understand the problem
  • Move complete @font-face rules into head-end.html using relURL
  • Remove broken @font-face blocks (using var(...)) from _variables_project.scss

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 :root inline style intended to provide base-path-safe font URLs.
  • Updated footer image src attributes to use relURL.
  • Switched the home page logo src to a relative path and updated CI cache actions to actions/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.

Comment thread assets/scss/_variables_project.scss Outdated
Comment on lines 15 to 24
local("PublicSans-Light"),
url("/fonts/public-sans/public-sans-latin-300-normal.woff2") format("woff2");
var(--omf-public-sans-300-src);
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread layouts/partials/hooks/head-end.html Outdated
Comment on lines +13 to +23
: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");
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot finished work on behalf of alee May 23, 2026 05:45
@alee alee merged commit 3696cfb into develop May 23, 2026
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.

3 participants