Skip to content

Point "View Live" links at production - #192

Merged
ssavutu merged 1 commit into
mainfrom
chore/point-view-live-at-production
Aug 6, 2026
Merged

Point "View Live" links at production#192
ssavutu merged 1 commit into
mainfrom
chore/point-view-live-at-production

Conversation

@ssavutu

@ssavutu ssavutu commented Aug 6, 2026

Copy link
Copy Markdown
Member

Part of the dev → production cutover.

The published frontend image bakes in https://dev.thetriangle.org as 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.yml passes no --build-arg, so the Dockerfile default is what actually ships. The TypeScript fallback in auth/urls.ts is 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 build clean, vitest 8/8, eslint clean apart from one pre-existing warning this branch doesn't touch.

🤖 Generated with Claude Code

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>
@ssavutu
ssavutu merged commit acfbf03 into main Aug 6, 2026
6 checks passed
@ssavutu
ssavutu deleted the chore/point-view-live-at-production branch August 6, 2026 05:12
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.

1 participant