Fix site CSS/image 404s on progit3.com (base path + CNAME) - #12
Merged
Conversation
Co-authored-by: Scott Chacon <schacon@gmail.com>
schacon
marked this pull request as ready for review
August 2, 2026 11:10
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 theprogit3.comcustom domain was attached.Fix
site/astro.config.mjs: defaultsiteis nowhttps://progit3.com, defaultbaseis/. Forks can still override viaSITE_URL/BASE_PATH.site/scripts/build-book.mjs: same default base change for the generated book pages' image paths..github/workflows/deploy-site.yml: addcname: progit3.comto the publish step. The workflow usesforce_orphan: true, so without this the next deploy would delete theCNAMEfile that currently exists ongh-pagesand detach the custom domain.site/README.md: update the deployment URLs to match.Verification
Built the site locally (
npm run build) and serveddist/withastro preview:href="/progit3/src="/progit3references remain anywhere indist/./,/book/,/_astro/Base.BrTWN6g_.css,/book-cover.png,/images/centralized_workflow.png,/pagefind/pagefind-ui.js, and/search/all return 200.Once merged, the deploy workflow republishes
gh-pagesand progit3.com picks up the corrected paths.