Repository navigation
Serve the site at the genairosity.com root - #87
Merged
Merged
Conversation
The Pages workflow derived the link prefix from the repository name, so every generated page requested its stylesheet and images under /genairosity/. That was correct at 508-dev.github.io/genairosity/, but the custom domain serves the artifact one level up, leaving every asset URL a 404. Declare the domain in site/CNAME and treat that file as the source of truth for how links are written: the workflow builds with an empty prefix while it exists, and the build copies it into the artifact so a deployment cannot drop the domain from the Pages configuration. The build now refuses a subpath prefix alongside a declared domain, because that pairing only ever publishes broken asset URLs. Deleting site/CNAME restores the repository prefix without further changes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
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.
Why
https://genairosity.com/returns 200 for its pages but 404s on every stylesheetand image. The DNS change was fine; the build did not know the site had moved.
.github/workflows/pages.ymlderivedSITE_BASE_PATHfrom the repository name, soeach page was generated with the project-pages prefix baked in:
Correct at
508-dev.github.io/genairosity/. The custom domain serves the sameartifact one level up, so the real file is
/assets/style.cssand the requestedpath does not exist.
What changed
site/CNAMEdeclaresgenairosity.comand becomes the source of truth for howlinks are written. It also keeps the Pages configuration from losing the domain,
since an Actions deployment replaces the published root wholesale.
.github/workflows/pages.ymlbuilds with an empty prefix while that fileexists, and falls back to the repository prefix otherwise. Deleting
site/CNAMEisenough to return to the project URL.
scripts/build.tscopiesCNAMEintodist, and throws when a non-emptySITE_BASE_PATHis passed alongside a declared domain. That pairing only everpublishes asset URLs that 404, so it should fail the build rather than the site.
tests/foundation.test.tsresolves every root-relativehref/srcin thebuilt output against a real file, and covers the conflict guard.
docs/deployment.md,README.mdrecord the production URL and the prefixrules, including how to move back.
Verification
./scripts/check-all.shpasses (27 tests). The local build emits root-relativeassets and
dist/CNAME:After merge, confirm the deployment succeeds and that Settings → Pages still shows
genairosity.com, then reload the site and check that styles apply.🤖 Generated with Claude Code