Skip to content

Fix: Correct asset and component pathing for GitHub Pages#8

Merged
attogram merged 1 commit into
mainfrom
fix/relative-asset-paths
Sep 16, 2025
Merged

Fix: Correct asset and component pathing for GitHub Pages#8
attogram merged 1 commit into
mainfrom
fix/relative-asset-paths

Conversation

@google-labs-jules
Copy link
Copy Markdown
Contributor

This PR provides a comprehensive fix for issues related to asset loading on the GitHub Pages site.

The following changes were made:

  • Renamed _header.html, _nav.html, and _footer.html to remove the leading underscore, which prevents them from being ignored by the Jekyll build process on GitHub Pages.
  • Updated docs/script.js to fetch the newly renamed component files.
  • Added a <base href="/static-magic/"> tag to the <head> of all HTML pages. This is the key change that makes all root-relative paths (e.g., /style.css, /header.html) resolve correctly from the site's subdirectory (/static-magic/) instead of the domain root.
  • Corrected stylesheet paths in docs/games/index.html and docs/index.html to work correctly with the new <base> tag.

These changes ensure that all components, assets (CSS, JS), and internal links will now load correctly across the entire site, including the homepage and all nested sub-pages.


PR created automatically by Jules for task 14995283047609608127

Resolves issues with assets and components not loading on the deployed site.

- Renames component files (e.g., `_header.html` to `header.html`) to prevent them from being ignored by Jekyll.
- Updates `script.js` to use the new component filenames.
- Adds a `<base href="/static-magic/">` tag to all HTML files to ensure that all absolute paths are resolved relative to the site's root in its subdirectory.
- Adjusts stylesheet links in `index.html` and `games/index.html` to be compatible with the new base URL.
@google-labs-jules
Copy link
Copy Markdown
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll acknowledge your comments with a 👀 emoji and then get to work. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

I will automatically address your feedback. For any comments you don't want me to act on, just include (aside).



For security, I will only act on instructions from the user who triggered this task for this pull request.

@attogram attogram marked this pull request as ready for review September 16, 2025 15:01
@attogram attogram merged commit f43035d into main Sep 16, 2025
1 check failed
@attogram attogram deleted the fix/relative-asset-paths branch September 16, 2025 15:01
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.

1 participant