Point "View Live" links at production - #192
Merged
Merged
Conversation
The published image baked in dev.thetriangle.org, which was right while the CMS was not driving production: an unconfigured build aimed at www would have sent editors to pages that did not reflect what they had just saved. That reverses at cutover. With the CMS behind www, a "View Live" link to dev sends editors to a copy of the site their readers never see -- and dev sits behind Cloudflare Access, so for anyone without access it does not resolve at all. The value is inlined by Vite at build time and publish.yml passes no build-arg, so the Dockerfile default is what actually ships; the TypeScript fallback is updated to match so the two cannot disagree. Override with --build-arg to aim a build at dev. Co-Authored-By: Claude Opus 5 <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.
Part of the dev → production cutover.
The published frontend image bakes in
https://dev.thetriangle.orgas the origin behind every "View Live" link and article permalink. That was correct while the CMS was not driving production — an unconfigured build aimed at www would have sent editors to pages that didn't reflect what they'd just saved.Cutover reverses it. With the CMS behind www, a "View Live" link pointing at dev sends editors to a copy of the site their readers never see, and dev sits behind Cloudflare Access, so for anyone without access it doesn't resolve at all.
Vite inlines the value at build time and
publish.ymlpasses no--build-arg, so the Dockerfile default is what actually ships. The TypeScript fallback inauth/urls.tsis updated to match so the two can't drift. Aim a build at dev with--build-arg VITE_PUBLIC_SITE_URL=https://dev.thetriangle.org.Merge order: this one is independent of the Scalene flip and safe to land whenever. It only changes where editors' preview links point, not what the CMS serves.
Verified:
tsc -b && vite buildclean, vitest 8/8, eslint clean apart from one pre-existing warning this branch doesn't touch.🤖 Generated with Claude Code