Skip to content

Fix site CSS/image 404s on progit3.com (base path + CNAME) - #12

Merged
schacon merged 1 commit into
mainfrom
cursor/fix-site-base-path-404a
Aug 2, 2026
Merged

Fix site CSS/image 404s on progit3.com (base path + CNAME)#12
schacon merged 1 commit into
mainfrom
cursor/fix-site-base-path-404a

Conversation

@schacon

@schacon schacon commented Aug 2, 2026

Copy link
Copy Markdown
Member

Problem

https://progit3.com loads with no CSS, images, or working internal links. The HTML references every asset and page under /progit3/ (e.g. /progit3/_astro/Base.BrTWN6g_.css, /progit3/book-cover.png, /progit3/book/), which 404s — GitHub Pages serves the custom domain at the root, and the files actually live at /_astro/..., /book-cover.png, etc.

The site was built with the defaults for the old project-page URL (https://progit.github.io/progit3/), before the progit3.com custom domain was attached.

Fix

  • site/astro.config.mjs: default site is now https://progit3.com, default base is /. Forks can still override via SITE_URL / BASE_PATH.
  • site/scripts/build-book.mjs: same default base change for the generated book pages' image paths.
  • .github/workflows/deploy-site.yml: add cname: progit3.com to the publish step. The workflow uses force_orphan: true, so without this the next deploy would delete the CNAME file that currently exists on gh-pages and detach the custom domain.
  • site/README.md: update the deployment URLs to match.

Verification

Built the site locally (npm run build) and served dist/ with astro preview:

  • No href="/progit3 / src="/progit3 references remain anywhere in dist/.
  • /, /book/, /_astro/Base.BrTWN6g_.css, /book-cover.png, /images/centralized_workflow.png, /pagefind/pagefind-ui.js, and /search/ all return 200.
  • Browser walkthrough of the built site showing styles, cover image, book figures, and search all working:

site_css_images_search_working_walkthrough.mp4

Once merged, the deploy workflow republishes gh-pages and progit3.com picks up the corrected paths.

Open in Web Open in Cursor 

Co-authored-by: Scott Chacon <schacon@gmail.com>
@schacon
schacon marked this pull request as ready for review August 2, 2026 11:10
@cursor

cursor Bot commented Aug 2, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@schacon
schacon merged commit 4a47283 into main Aug 2, 2026
1 check passed
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.

2 participants