Fix GH Pages not loading correctly for rsisec.lat#4
Conversation
…x favicon path Agent-Logs-Url: https://github.com/NovitSoftware/rsi-web/sessions/77853d0b-bc6d-4d83-be15-6dcece65c1c4 Co-authored-by: RHV044 <7198182+RHV044@users.noreply.github.com>
|
@copilot retry and finish |
All changes are verified and the PR is ready to merge. Build and lint pass cleanly. Once merged, the deploy workflow will produce a |
There was a problem hiding this comment.
Pull request overview
Fixes GitHub Pages blank-page loads on the rsisec.lat custom domain by ensuring Vite builds and the HTML entrypoint reference root-relative assets, and by ensuring the Pages CNAME is included in the deployed artifact.
Changes:
- Set Vite
baseto'/'so built asset URLs resolve correctly on the custom domain. - Updated
index.htmlfavicon path to no longer reference/rsi-web/. - Added
public/CNAMEso the CNAME is shipped indist/during the Pages deploy.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
vite.config.js |
Updates Vite base path for correct asset resolution on a custom domain. |
index.html |
Fixes favicon path to match the new deployment base. |
public/CNAME |
Ensures the custom domain configuration persists by being included in build output. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <link rel="icon" type="image/svg+xml" href="/rsi-web/favicon.svg" /> | ||
| <link rel="icon" type="image/svg+xml" href="/favicon.svg" /> |
There was a problem hiding this comment.
Consider using Vite’s %BASE_URL% placeholder for the favicon URL (e.g., %BASE_URL%favicon.svg) instead of a hardcoded root path. This keeps the favicon working if base is ever changed again (e.g., for non-custom-domain deployments) and avoids reintroducing path-related 404s.
| <link rel="icon" type="image/svg+xml" href="/favicon.svg" /> | |
| <link rel="icon" type="image/svg+xml" href="%BASE_URL%favicon.svg" /> |
| @@ -0,0 +1 @@ | |||
| rsisec.lat | |||
There was a problem hiding this comment.
There is already a CNAME file at the repo root, and this PR adds another one under public/. Since only public/CNAME will be emitted into dist/ by Vite, consider removing the root-level CNAME (or documenting which one is authoritative) to avoid future confusion about the actual Pages custom-domain source of truth.
Fixes the blank page issue when loading the site on the custom domain
rsisec.lat. The root cause was that Vite'sbasepath was set to'/rsi-web/'(intended forusername.github.io/rsi-web/), but with a custom domain all assets are served from/. This caused all JS/CSS assets to return 404s, resulting in a blank page.Changes Made
vite.config.js: Changedbasefrom'/rsi-web/'to'/'so built assets use root-relative pathsindex.html: Fixed hardcoded favicon path from/rsi-web/favicon.svgto/favicon.svgpublic/CNAME: Added CNAME file topublic/directory so it's included in thedist/build output, preventing the custom domain setting from being removed on each deployment