Skip to content

Fix GH Pages not loading correctly for rsisec.lat#4

Merged
RHV044 merged 2 commits into
mainfrom
copilot/fix-gh-pages-loading-issue
Mar 31, 2026
Merged

Fix GH Pages not loading correctly for rsisec.lat#4
RHV044 merged 2 commits into
mainfrom
copilot/fix-gh-pages-loading-issue

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 31, 2026

Fixes the blank page issue when loading the site on the custom domain rsisec.lat. The root cause was that Vite's base path was set to '/rsi-web/' (intended for username.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: Changed base from '/rsi-web/' to '/' so built assets use root-relative paths
  • index.html: Fixed hardcoded favicon path from /rsi-web/favicon.svg to /favicon.svg
  • public/CNAME: Added CNAME file to public/ directory so it's included in the dist/ build output, preventing the custom domain setting from being removed on each deployment

Copilot AI linked an issue Mar 31, 2026 that may be closed by this pull request
@RHV044
Copy link
Copy Markdown
Contributor

RHV044 commented Mar 31, 2026

@copilot retry and finish

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 31, 2026

@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 dist/ with all assets served from / instead of /rsi-web/, which is what the custom domain rsisec.lat requires. The CNAME in public/ ensures the custom domain setting persists across deployments.

Copilot AI changed the title [WIP] Fix GH Pages not loading correctly for rsisec.lat Fix GH Pages not loading correctly for rsisec.lat Mar 31, 2026
@RHV044 RHV044 marked this pull request as ready for review March 31, 2026 15:48
Copilot AI review requested due to automatic review settings March 31, 2026 15:48
@RHV044 RHV044 merged commit 964ed32 into main Mar 31, 2026
1 check passed
Copy link
Copy Markdown

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

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 base to '/' so built asset URLs resolve correctly on the custom domain.
  • Updated index.html favicon path to no longer reference /rsi-web/.
  • Added public/CNAME so the CNAME is shipped in dist/ 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.

Comment thread index.html
<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" />
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="icon" type="image/svg+xml" href="%BASE_URL%favicon.svg" />

Copilot uses AI. Check for mistakes.
Comment thread public/CNAME
@@ -0,0 +1 @@
rsisec.lat
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
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.

La web de GH Pages no carga bien. queda en blanco

3 participants