Skip to content

Keep CLAUDE.md out of the published pkgdown site - #241

Merged
NewGraphEnvironment merged 3 commits into
mainfrom
240-claude-md-published
Aug 24, 2026
Merged

Keep CLAUDE.md out of the published pkgdown site#241
NewGraphEnvironment merged 3 commits into
mainfrom
240-claude-md-published

Conversation

@NewGraphEnvironment

Copy link
Copy Markdown
Owner

Same fix as NewGraphEnvironment/rfp#180.

CLAUDE.html, the raw CLAUDE.md and the search.json index are publicly readable here. The internal-only conventions are not in them — the visibility filter worked, unlike rfp and gq where the SR&ED section went public. So this is untidy rather than harmful.

Worth fixing anyway: nothing currently stops the harmful version. The filter rests on an assumption pkgdown breaks, and a future INTERNAL.md or a visibility change would publish silently.

Removal happens before the build — after would leave the verbatim copy and the search index entry. The gate fails on any unexpected top-level page.

Fixes #240

🤖 Generated with Claude Code

https://claude.ai/code/session_01EQSMwbhZ9SRqQQTrhmBYj7

CLAUDE.html, a verbatim CLAUDE.md and the search.json index were all
publicly readable. The internal-only conventions are not in them here --
the visibility filter worked -- so this is untidy rather than harmful.

Fixed anyway because nothing currently stops the harmful version. The
filter rests on an assumption pkgdown breaks, that a repo's CLAUDE.md
stays where you put it, and a future INTERNAL.md or a visibility change
would publish silently. See NewGraphEnvironment/rfp#180, where the SR&ED
section did go public.

Removal happens before the build; after would leave the verbatim copy
and the search.json entry.

Fixes #240
With clean: false the deploy action never deletes. Every file ever
published stays on gh-pages regardless of whether the source still
produces it, which has two consequences: removing a file from the repo
does not unpublish it, and a leak cannot be fixed by fixing the build --
the stale copies need a separate purge that is easy to forget.

clean: true makes the deployed site equal to what the build produced.
Fixing the build is then sufficient, and the site becomes auditable.

Checked before flipping, since clean: true deletes anything on gh-pages
not present in docs/: no CNAME on any of these repos (the custom domain
comes from the org site repo and project sites inherit it as subpaths),
no dev/ versioned docs, and the favicon and webmanifest assets are build
output from pkgdown/favicon/ rather than hand-added.

The gate's allowlist is now declared per repo rather than assumed, so a
new root markdown file fails the build until someone decides whether it
should be public.

NOTICE and RUNBOOK are declared in the allowlist rather than blocked.
link is a public repo and both are genuine documentation -- an
attribution notice and a technical runbook about public data sources.
That is the decision the allowlist exists to record.

Convention recorded in soul: conventions/pkgdown-publishing.md
@NewGraphEnvironment

Copy link
Copy Markdown
Owner Author

Updated: also flips the deploy to clean: true.

With clean: false the action never deletes — so removing a file from the repo does not unpublish it, and fixing the build would not have removed the copies already on gh-pages. clean: true makes the deployed site equal to what the build produced, so the fix is self-completing rather than needing a separate purge.

Checked before flipping (it deletes anything on gh-pages not in docs/): no CNAME on any of these repos — the custom domain comes from the org site repo and project sites inherit it as subpaths — no dev/ versioned docs, and the favicon/webmanifest assets are build output from pkgdown/favicon/.

The gate allowlist is now declared per repo, so a new root markdown file fails until someone decides whether it should be public.

Convention recorded in soul: conventions/pkgdown-publishing.md.

…erge

The job carried if: github.event_name != 'pull_request', so it skipped
entirely on PRs -- which meant the leak gate added in this branch would
first run on merge to main, after review rather than during it. A gate
you cannot see pass is not much better than no gate.

Deploying is still refused on pull requests. That condition already
lives on the deploy step itself, which is the right place for it: every
other step in the job is safe to run on a PR, and gating the whole job
only cost the verification.

Relates to #240
@NewGraphEnvironment

Copy link
Copy Markdown
Owner Author

Follow-up: the pkgdown job carried if: github.event_name != 'pull_request', so it skipped on PRs — meaning the leak gate added here would first run on merge, after review rather than during it. A gate you cannot watch pass is not much better than no gate.

Removed the job-level condition. Deploying is still refused on PRs — that condition already lives on the deploy step, which is the right place for it: every other step is safe to run on a PR, and gating the whole job only cost the verification.

link was the only one of the six with this; the others already build on PRs.

@NewGraphEnvironment
NewGraphEnvironment merged commit 8c8c29b into main Aug 24, 2026
1 check passed
@NewGraphEnvironment
NewGraphEnvironment deleted the 240-claude-md-published branch August 24, 2026 03:56
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.

CLAUDE.md is published on the pkgdown site

1 participant