Skip to content

Commit 2fff202

Browse files
cdervclaude
andcommitted
Revert siteUrl pass-through for Connect Cloud rendering (.11)
During production testing, we discovered that Connect Cloud serves content at a different domain than the dashboard URL stored in _publish.yml: - Dashboard URL: connect.posit.cloud/account/content/<id> - Serving URL: <id>.share.connect.posit.cloud/ Passing the dashboard URL as siteUrl would override the correct window.location.host fallback in linkExternalFilter, causing all links to be misclassified as external. The same mismatch would affect canonical URLs and Open Graph metadata. This differs from gh-pages where the published URL and serving URL are the same domain, making siteUrl pass-through correct there. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1761371 commit 2fff202

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/publish/posit-connect-cloud/posit-connect-cloud.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,12 +462,16 @@ async function publish(
462462
info("");
463463

464464
// Step 2: Render and stage
465+
// Note: siteUrl is intentionally not passed here. Connect Cloud serves
466+
// content at a different domain (*.share.connect.posit.cloud) than the
467+
// dashboard URL stored in _publish.yml (connect.posit.cloud/account/content/id).
468+
// Passing the dashboard URL would break linkExternalFilter by overriding
469+
// the correct window.location.host fallback in the rendered HTML.
465470
const publishFiles = await renderForPublish(
466471
render,
467472
kPositConnectCloud,
468473
type,
469474
title,
470-
type === "site" ? target?.url : undefined,
471475
);
472476

473477
// Step 3: Bundle and upload

tests/docs/manual/publish-connect-cloud/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,6 @@ This content was updated for Test 4.
142142
- [ ] URL is same as Test 3
143143
- [ ] Hard-refresh (Ctrl+F5) shows updated text
144144
- [ ] About page still works
145-
- [ ] External link to quarto.org opens in new tab (siteUrl active → linkExternalFilter works)
146-
- [ ] View source: external link has appropriate attributes (not treated as internal link)
147145
- [ ] No duplicate content created on dashboard
148146

149147
**Cleanup:** Revert the edit:

0 commit comments

Comments
 (0)