Point the nav's Docs link at the docs deployment, from an env var - #106
Merged
Merged
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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>
This branch was successfully deployed
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.
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_URLnow readsNEXT_PUBLIC_DOCS_URL, falling back to the README.No hostname in the source
Same reason
SITE_URLhas none: it's a deploy-time fact, and this project has shipped a hardcoded domain it didn't own twice — which is whyscripts/drift-check.mjsexists 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 becomeexample.comanddocs.example.comonce 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
29 ok, 1 drifted. Restored:30 ok, 0 drifted.NEXT_PUBLIC_DOCS_URL=https://husk-dev-docs.vercel.appand checked the rendered output, not the exit code —href="https://husk-dev-docs.vercel.app"is in the nav markup.husk-devproject for Production and Preview, so the next deploy picks it up.🤖 Generated with Claude Code