feat(docs): serve the site from docs.getprick.dev, and nowhere else - #39
Merged
Merged
Conversation
The zone is live, so the documentation site stops living on a workers.dev
subdomain and moves onto a real hostname.
`packages/docs/wrangler.jsonc` routes `docs.getprick.dev` as a Cloudflare
custom domain and sets `workers_dev` and `preview_urls` to false. Those are
the same two lines the application Worker carries, for an entirely different
reason, and the comment block that used to argue they must NOT be set here
("the asymmetry is the point") has been rewritten rather than left to
contradict the config. On the app they are a security control: Access attaches
to a hostname, so an unprotected one is a complete bypass. This Worker serves
pre-rendered Markdown that is already public on GitHub and has nothing to
expose. They are off because a second hostname serving byte-identical pages
duplicates every canonical URL on the site.
Three files have to name that hostname and each says it in a different
language, so `scripts/docs.mjs` exports the one constant and
`scripts/docs.test.mjs` asserts `astro.config.ts` and `wrangler.jsonc` agree
with it. Both config files already carried a comment saying "do both in the
same commit"; this is what makes that mechanical.
The annotated tag a cut pushes now names the URL, so `git show docs-v…` says
where a release went and not only what it was numbered.
docs-release.yml took the environment URL, the job summary and the release
notes from wrangler-action's `deployment-url`, which is scraped from the deploy
log. With no *.workers.dev hostname left in that output, an empty result would
leave the notes reading "url:" and nothing, so the three consumers now fall
back to the hostname read out of `scripts/docs.mjs`. The deploy's own report
still wins wherever it is non-empty.
Every documentation link in README.md is now absolute. That README is what
`scripts/npm-package.mjs` copies into the `@yashau/prick` package, where a
relative `docs/*.md` link resolves to nothing on npmjs.com. All ten targets
were checked against the built site. Repo links -- releases, the scoop bucket,
the clone URL -- stay as they were.
`prick.example.com` throughout the docs is untouched on purpose: prick is
self-hosted, and that placeholder stands for the reader's own Worker, not for
anything on this zone.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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
getprick.devzone is live, so the documentation site moves off itsworkers.dev subdomain and onto a real hostname.
The hostname
packages/docs/wrangler.jsoncroutesdocs.getprick.devas a Cloudflare customdomain and sets
workers_devandpreview_urlstofalse.Those are the same two lines
packages/app/wrangler.jsonccarries, for anentirely different reason. The comment block here used to argue they must not
be set ("the asymmetry is the point"), so it has been rewritten rather than left
contradicting the config:
hostname, so one it is not in front of serves every secret without a JWT.
public in this repository — there is nothing to expose. They are off because a
second hostname serving byte-identical pages duplicates every canonical URL on
the site.
Same values, opposite arguments. Neither file's comment should be copied onto the
other.
Three files, one hostname
astro.config.ts(site),wrangler.jsonc(routes) andscripts/docs.mjseach state the hostname in a different language, and both config files already
carried a comment saying "do both in the same commit".
scripts/docs.mjsnowexports the single constant and
scripts/docs.test.mjsasserts the other twoagree with it, plus that both settings are off — so a hostname change that misses
one fails the suite instead of shipping half done.
The release
The annotated tag a cut pushes now names the URL, so
git show docs-v…says wherea release went and not just what it was numbered:
docs-release.ymltook the environment URL, the job summary and the release notesfrom wrangler-action's
deployment-url, which is scraped out of the deploy log.With no
*.workers.devhostname left in that output, an empty result would leavethe notes reading
- url:and nothing — so all three consumers now fall back tothe hostname read from
scripts/docs.mjs. The deploy's own report still winswherever it is non-empty.
Links
Every documentation link in
README.mdis now absolute. That file is whatscripts/npm-package.mjscopies into the@yashau/prickpackage, and onnpmjs.com a relative
docs/*.mdlink resolves to nothing. All ten targets werechecked against the built site. A docs badge joins the row; repo links (releases,
the scoop bucket, the clone URL) are unchanged.
packages/mcp/README.md— the readme npm shows for@yashau/prick-mcp— had noroute back to the documentation at all, and the MCP guide pointed at
packages/mcp/README.mdas a bare repo path a reader on the site cannot open.Both are links now.
prick.example.comthroughout the docs is deliberately untouched. prick isself-hosted: that placeholder stands for the reader's own Worker, not for anything
on this zone.
Checks
fmt:check,lintoverscriptsandpackages/docs,lint:loc,lint:typos,lint:actions,lint:zizmor,astro check, and the 275 script tests all pass.wrangler deploy --dry-runparses the new config, and a real docs build confirmsrel="canonical",og:urland the sitemap all carry the new hostname with notrace of the old one.
🤖 Generated with Claude Code