refactor(marketing,docs): build links from the configured hosts
Merged
KI
23d ago+79+79+01234567890123456789-64-64-01234567890123456789
Summary
Second part of #8513, stacked on #8609. Marketing and docs build their links from the helpers in #8609, not from hardcoded superset.sh strings.
- Marketing:
next.config.tslegacy docs redirects and/mcp, the install command, WebMCP tools, contact/download/enterprise actions (sender fromNOREPLY_FROM),llms.ts,product-facts.tsandapi-url.ts. - The PublishCard text and the contact page's status and trust hosts follow the root domain. The contact catalog entry now uses
{statusHost}/{trustHost}; all 17 translations are carried over with the same wording. - Docs: the MCP server card, docs MCP server instructions,
llms.txtand the base URL insource.ts.
API references (/mcp, the OpenAPI Link header and MCP instructions) stay on https://api.superset.sh.
Verification
All of this was verified on #8513 with the same code:
- Default env: a production build crawl of 3,603 marketing URLs, including all 153 legacy redirects, plus 184 docs URLs, matched main. The only differences were build hashes, OG images and the live leaderboard API rate limit.
- Root domain set to example.org: links, canonical URLs and docs redirects move; API, relay and realtime hosts stay.
- Browser check: headless Chrome over CDP showed no new console errors or CSP violations.
Tests:
apps/marketing: 173 pass.bun run check:i18n: clean, with 0 missing translations in every locale.
Summary by cubic
Builds marketing and docs links from the configured CANONICAL_URLS and COMPANY constants instead of hardcoded superset.sh strings. Default output is unchanged; API references (the /mcp redirect, the OpenAPI Link header, and MCP instructions) stay on api.superset.sh.
Reworked
- Marketing: legacy docs redirects,
/mcp, install commands, WebMCP tools,llms.txt, and product facts now use the constants; email senders come fromNOREPLY_FROMand recipients fromCOMPANY.SUPPORT_EMAIL. - Docs: the MCP card, docs MCP instructions,
llms.txt, and page source URLs follow the configured docs host. - Contact page status and trust hosts derive from
COMPANY.STATUS_URLandCOMPANY.TRUST_URL; all 17 locale catalogs updated to the new interpolated message. - Verified end-to-end: a production crawl of 3,603 marketing URLs (including all 153 legacy redirects) and 184 docs URLs matched main, with no console errors or CSP violations.