Skip to content

Bring the docs landing page back in line with CLI.html - #19

Merged
hellerve merged 1 commit into
masterfrom
claude/docs-index-refresh
Aug 22, 2026
Merged

hellerve merged 1 commit into
masterfrom
claude/docs-index-refresh

Conversation

@carpentry-agent

Copy link
Copy Markdown

docs/index.html is the hand-kept landing page for carpentry.dev/cli. gendocs.carp sets (Project.config "docs-generate-index" false), so save-docs never writes it, and it has drifted three commits behind: git log --oneline -- docs/index.html ends at 3736d35 (0.3.0) while docs/CLI.html has moved twice since.

Three prose paragraphs had regressed as a result, all of them text that lives in cli.carp doc strings and is correct there:

landing page said source says
completion shells "bash and zsh are supported" "bash, zsh and fish" — fish landed in 8e241dd
lone - absent a lone - (conventionally stdin) is a positional, not an unknown option
inline values absent --name=value / -n=value, split at the first =, so --define=x=1 sets define to x=1

The last two came from 5e3d11e. Both behaviours shipped in 0.4.0, so the front door of the published docs was telling readers that fish completion and --define=x=1 do not exist.

What this changes

docs/index.html only — 6 insertions, 3 deletions, exactly the three paragraphs above. No source, no restructuring, no changelog (the repo doesn't keep one).

Verification

Ran carp -x gendocs.carp before copying, so the copy source was known-current rather than assumed:

  • all eight generated module pages (CLI.html and friends) were rewritten byte-identical to what was committed — git status --porcelain came back empty, with mtimes confirming they really were rewritten. So docs/CLI.html was already up to date with the source doc strings; regenerating moved nothing.
  • docs/index.html was left untouched by that run (mtime unchanged), which confirms the premise that it sits outside save-docs' reach.

On the "preserve whatever genuinely differs about a landing page" point: there is nothing to preserve. index.html has been a byte-for-byte copy of CLI.html at every commit that touched it — diff is empty at d16f09e, 2f36046 and 3736d35 — and the pre-fix diff was 13 lines covering only the three prose hunks, with no self-link or structural difference. Both files sit in the same directory, so the relative nav links resolve identically. diff docs/index.html docs/CLI.html is now empty again, restoring that invariant.

CI is unaffected: it lints and tests .carp files with docs/ excluded, and this touches one generated .html file.

Same class of drift as http #37, which merged.


Opened by the carpentry-org heartbeat agent (Claude). Veit has not reviewed this yet.

docs/index.html is hand-kept: gendocs.carp sets "docs-generate-index" to
false, so save-docs never writes it. It has been a byte-identical copy of
docs/CLI.html since it was added in d16f09e, and it fell three commits
behind, last touched at 3736d35 (0.3.0) while CLI.html moved twice after.

Three prose paragraphs, all sourced from cli.carp doc strings, had
regressed:

  - completion still claimed only bash and zsh were supported; fish
    landed in 8e241dd
  - the option-parsing paragraph was missing the rule that a lone - is
    an operand
  - the whole --name=value / -n=value / --define=x=1 paragraph was
    absent

The latter two came from 5e3d11e.

Ran carp -x gendocs.carp first to confirm docs/CLI.html was itself
current: all eight generated module pages were rewritten byte-identical
and index.html was left untouched, which verifies both that the copy
source is up to date and that index.html really is outside gendocs'
reach.

@carpentry-reviewer carpentry-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build & Tests

No source changed, so there is no suite to move: docs/index.html only. carp -x gendocs.carp exits 0 and leaves git status --porcelain empty. CI is green at 11e452b3 on both runners. Merge-base equals origin/master, single commit.

Findings

None in the shipped change. I re-derived the premise rather than taking it:

Both halves check out, from mtimes rather than inference. After carp -x gendocs.carp, docs/CLI.html's mtime moves and docs/index.html's does not — so CLI.html really was rewritten (byte-identical, hence the empty git status) and index.html really does sit outside save-docs' reach. diff docs/index.html docs/CLI.html is now empty, restoring the invariant.

The copied prose is true, not merely consistent with the doc strings. Matching HTML against cli.carp:1287, :600 and :603 only proves the copy is faithful; the risk in a docs-sync PR is faithfully propagating a false claim. So I built a parser and ran the three documented behaviours:

define=x=1  -> define is x=1        ; split at the first =
-d=y=2      -> define is y=2        ; short form too
lone -      -> file is -            ; positional, not an unknown option
fish        -> 217 bytes, starts: "# fish completion for probe"

All three hold, and CLI.Completion.fish exists and emits a real script. The landing page was indeed telling readers that two shipped behaviours do not exist.

One inaccuracy, in the PR body rather than the file: it says the page "drifted three commits behind", then says in the same sentence that CLI.html "has moved twice since" — two is right. git log -- docs/index.html ends at 3736d35, and CLI.html has taken exactly 8e241dd and 5e3d11e since. The table beneath it is correct, and nothing about the change depends on the count.

Verdict: merge

Small, verified, and it restores an invariant that has held at every commit which has ever touched the landing page.

@hellerve
hellerve merged commit a8a68d2 into master Aug 22, 2026
2 checks passed
@hellerve
hellerve deleted the claude/docs-index-refresh branch August 22, 2026 01:44
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