Skip to content

feat(docs): serve the site from docs.getprick.dev, and nowhere else - #39

Merged
yashau merged 1 commit into
mainfrom
claude/getprick-dev-domain-migration-be8d64
Sep 1, 2026
Merged

feat(docs): serve the site from docs.getprick.dev, and nowhere else#39
yashau merged 1 commit into
mainfrom
claude/getprick-dev-domain-migration-be8d64

Conversation

@yashau

@yashau yashau commented Sep 1, 2026

Copy link
Copy Markdown
Owner

The getprick.dev zone is live, so the documentation site moves off its
workers.dev subdomain and onto a real hostname.

The 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 packages/app/wrangler.jsonc carries, for an
entirely 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:

  • On the app they are a security control. Cloudflare Access attaches to a
    hostname, so one it is not in front of serves every secret without a JWT.
  • Here they are not. This Worker serves pre-rendered Markdown that is already
    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) and scripts/docs.mjs
each state the hostname in a different language, and both config files already
carried a comment saying "do both in the same commit". scripts/docs.mjs now
exports the single constant and scripts/docs.test.mjs asserts the other two
agree 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 where
a release went and not just what it was numbered:

docs-v2026.815.0

Documentation site 2026.08.15.0 — release 0 of 2026-08-15 (UTC).
Serving https://docs.getprick.dev from this commit.

Pushing this tag is what deployed it; docs-release.yml computes no version.

docs-release.yml took the environment URL, the job summary and the release notes
from wrangler-action's deployment-url, which is scraped out of the deploy log.
With no *.workers.dev hostname left in that output, an empty result would leave
the notes reading - url: and nothing — so all three consumers now fall back to
the hostname read from scripts/docs.mjs. The deploy's own report still wins
wherever it is non-empty.

Links

Every documentation link in README.md is now absolute. That file is what
scripts/npm-package.mjs copies into the @yashau/prick package, and on
npmjs.com a relative docs/*.md link resolves to nothing. All ten targets were
checked 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 no
route back to the documentation at all, and the MCP guide pointed at
packages/mcp/README.md as a bare repo path a reader on the site cannot open.
Both are links now.

prick.example.com throughout the docs is deliberately untouched. prick is
self-hosted: that placeholder stands for the reader's own Worker, not for anything
on this zone.

Checks

fmt:check, lint over scripts and packages/docs, lint:loc, lint:typos,
lint:actions, lint:zizmor, astro check, and the 275 script tests all pass.
wrangler deploy --dry-run parses the new config, and a real docs build confirms
rel="canonical", og:url and the sitemap all carry the new hostname with no
trace of the old one.

🤖 Generated with Claude Code

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>
@yashau
yashau merged commit 34099ab into main Sep 1, 2026
17 checks passed
@yashau
yashau deleted the claude/getprick-dev-domain-migration-be8d64 branch September 1, 2026 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant