Skip to content

Cloudflare Worker: explain why you add the script, in its own section - #119

Merged
forgetso merged 1 commit into
mainfrom
docs/worker-script-framing
Oct 20, 2026
Merged

forgetso merged 1 commit into
mainfrom
docs/worker-script-framing

Conversation

@forgetso

Copy link
Copy Markdown
Member

Ports the part of #115 that's worth keeping. The rest of that PR is already on main via #116 and #118, and its branch is against the pre-#116 page so it can't rebase cleanly.

What's taken

A section instead of a trailing sentence. Main answered "why am I editing my own HTML?" with one sentence tacked onto the end of "What you get" — somewhere nobody would look for it. #115 made it a section of its own, framed for the reader rather than as a note about what changed, and added that Lambda@Edge works the same way. Better on all three counts.

A clearer heading for the install step: "Add the Protect script to your pages" rather than "Add the snippet". The troubleshooting anchor pointing at it follows.

What isn't

#115 describes the install as one <script> tag. There are two — the window.prosopo_config block and the bundle — and the paragraph directly under the snippet explains why both are required and what breaks if you skip the first. So main's wording stays.

Test coverage

astro build passes, 417 pages.

Renaming a heading moves its anchor, so I re-walked every cloudflare-worker#… anchor used by any page in the site and confirmed all resolve against the built page. The new section gets #why-the-worker-doesnt-add-the-script-for-you and the install step #2a-add-the-protect-script-to-your-pages.

Credited to @goastler in the commit — the wording is theirs.

Once this lands, #115 can close: everything in it is then either on main or deliberately declined.

🤖 Generated with Claude Code

Ported from #115, which is otherwise superseded by #116 and #118.

Main had this as a trailing sentence on the "What you get" section, which
put the answer to "why am I editing my own HTML?" somewhere nobody would
look for it. #115 made it a section of its own, framed for the reader rather
than as a note about what changed, and pointed out that Lambda@Edge works
the same way. That is better on all three counts, so take it.

Its clearer heading for the install step comes too: "Add the Protect script
to your pages" rather than "Add the snippet". The troubleshooting anchor
that aims at it follows.

Not taken: #115 describes the install as one script tag. There are two --
the config block and the bundle -- and the paragraph under the snippet
depends on both, so main's wording stays.

astro build passes, 417 pages. Re-walked every cloudflare-worker# anchor
used anywhere in the site after the heading rename: all resolve.

Co-Authored-By: George Oastler <goastler@users.noreply.github.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@netlify

netlify Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for peaceful-pothos-9e62ce ready!

Name Link
🔨 Latest commit 820cba2
🔍 Latest deploy log https://app.netlify.com/projects/peaceful-pothos-9e62ce/deploys/6ad772a8a87007863cd54848
😎 Deploy Preview https://deploy-preview-119--peaceful-pothos-9e62ce.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@forgetso
forgetso merged commit 49c8ed2 into main Oct 20, 2026
5 of 6 checks passed
@forgetso
forgetso deleted the docs/worker-script-framing branch October 20, 2026 13:55
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