Skip to content

Point the nav's Docs link at the docs deployment, from an env var - #106

Merged
Hotragn merged 2 commits into
mainfrom
fix/docs-nav-url
Sep 17, 2026
Merged

Hotragn merged 2 commits into
mainfrom
fix/docs-nav-url

Conversation

@Hotragn

@Hotragn Hotragn commented Sep 17, 2026

Copy link
Copy Markdown
Owner

The Docs item in the product site's nav went to the repository README. Correct while there was no docs site — there is one now, and the link still pointed at GitHub.

DOCS_URL now reads NEXT_PUBLIC_DOCS_URL, falling back to the README.

No hostname in the source

Same reason SITE_URL has none: it's a deploy-time fact, and this project has shipped a hardcoded domain it didn't own twice — which is why scripts/drift-check.mjs exists at all.

A second variable, not something derived from SITE_URL. The two sites are two Vercel projects on unrelated hostnames today (husk-dev / husk-dev-docs), and only become example.com and docs.example.com once a real domain exists. A derivation would be right exactly once and wrong on either side of it.

The README fallback is the honest default — a link that reaches documentation beats one pointing at a hostname that may not answer.

Verified

  • Drift assertion added, and proven to fail: removing the env read gives 29 ok, 1 drifted. Restored: 30 ok, 0 drifted.
  • Built with NEXT_PUBLIC_DOCS_URL=https://husk-dev-docs.vercel.app and checked the rendered output, not the exit code — href="https://husk-dev-docs.vercel.app" is in the nav markup.
  • The variable is already set on the husk-dev project for Production and Preview, so the next deploy picks it up.

🤖 Generated with Claude Code

The Docs item in the product site's nav went to the repository README. That
was correct while there was no docs site; there is one now, and the link still
pointed at GitHub.

`DOCS_URL` reads `NEXT_PUBLIC_DOCS_URL`, falling back to the README. No
hostname in the source, for the same reason `SITE_URL` has none: it is a
deploy-time fact, and the drift check exists because this project has shipped a
hardcoded domain it did not own twice.

A second variable rather than something derived from `SITE_URL`. The two sites
are two Vercel projects on unrelated hostnames today, and only become
`example.com` and `docs.example.com` once a real domain exists -- a derivation
would be right exactly once and wrong on either side of it.

The README fallback is the honest default: a link that reaches documentation
beats one pointing at a hostname that may not answer.

Asserted, and verified to fail rather than only to pass -- removing the env
read gives 29 ok, 1 drifted. Built with the variable set and checked the
output, not the exit code: `href="https://husk-dev-docs.vercel.app"` is in the
rendered nav.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
husk-dev Ready Ready Preview Sep 17, 2026 6:46am UTC
husk-dev-docs Ready Ready Preview Sep 17, 2026 6:46am UTC

@github-actions github-actions Bot added apps Touches apps/ (console, docs, web) build & ci Workflows, scripts, or root build config labels Sep 17, 2026
The two Vercel checks on this PR failed because both projects still had
Root Directory `.`, so a Git build cloned the monorepo and looked for a
Next app at the root. They are now apps/web and apps/docs. This empty
commit exists to re-trigger those checks against the corrected setting.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Hotragn
Hotragn merged commit cb5a906 into main Sep 17, 2026
13 checks passed
@Hotragn
Hotragn deleted the fix/docs-nav-url branch September 17, 2026 06:49

This branch was successfully deployed

2 active deployments
Preview – husk-dev ac0e1211 Deployed Sep 17, 2026 by vercel[bot]
Preview – husk-dev-docs ac0e1211 Deployed Sep 17, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apps Touches apps/ (console, docs, web) build & ci Workflows, scripts, or root build config

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant