deploy: serve at sunaemon.dev/math/ as a project page; drop the unused --base-path feature - #3
Merged
Merged
Conversation
…e /math/) sunaemon.dev is the custom domain of the user site (sunaemon.github.io), so this repo is served as a project page at sunaemon.dev/math/ automatically — the /math/ prefix comes from the repo name. The deploy was also passing --base-path math and writing CNAME=sunaemon.dev, which (a) added a second /math/ segment, publishing the viewer at sunaemon.dev/math/math/polish-space-ch1/, and (b) re-claimed a domain the user site owns. Drop both: build the dist with no base path and no CNAME. The viewer derives the /math/ prefix from the URL at runtime (util.ts mountPrefix), so it lands at sunaemon.dev/math/polish-space-ch1/. The pre-move sunaemon.dev/polish-space-ch1/ URL is now handled by a redirect in the user-site repo, so the build needs no --legacy-redirect either. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe GitHub Pages workflow removes ChangesPages Deploy Workflow
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
With the viewer served as a project page at sunaemon.dev/math/ (the /math/ prefix coming from the repo name, detected at runtime by util.ts mountPrefix), the static-dist --base-path/--legacy-redirect flags and their path-prefix validation are dead code. Restore static-dist.ts to building the dist at the host root: <dist>/index.html redirects to <mount>/, the mount tree sits at <dist>/<mount>/. Deletes parseArgs/normalizePrefix handling for both flags. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
The viewer was published at
https://sunaemon.dev/math/math/polish-space-ch1/—/math/doubled.sunaemon.devis the custom domain of the user site (sunaemon.github.io), so this repo is served as a project page atsunaemon.dev/math/automatically (prefix = repo name). The deploy also passed--base-path mathand wroteCNAME=sunaemon.dev, which doubled the prefix and re-claimed a domain the user site owns.Fix
Two commits:
make dist BOOKLINK_PROJECT=polish-space-ch1; removed theSet custom domainstep). The viewer derives the/math/prefix from the URL at runtime (util.tsmountPrefix), so it lands athttps://sunaemon.dev/math/polish-space-ch1/.--base-path/--legacy-redirectdist feature (and its path-prefix validation) fromstatic-dist.ts, restoring the host-root dist layout. The pre-movesunaemon.dev/polish-space-ch1/URL is handled by a redirect in the user-site repo, so no--legacy-redirectis needed.Verified:
make lint-actionlint+make lint-tscpass; a default-mode dist build servesindex.html→polish-space-ch1/with the mount atpolish-space-ch1/.After merge
static-dist.tsfeature; it needs the same change so a futuremake publishexport doesn't reintroduce the doubling/feature.🤖 Generated with Claude Code