Skip to content

Docs: give the docs/ folder an index page, checked by cargo xtask docs to name every guide - #629

Merged
schmitch merged 1 commit into
mainfrom
schmitch/sharp-cerf-pkzem8
Oct 28, 2026
Merged

schmitch merged 1 commit into
mainfrom
schmitch/sharp-cerf-pkzem8

Conversation

@schmitch

Copy link
Copy Markdown
Member

Fixes #628

https://github.com/forgepkg/forge/tree/main/docs listed the guides as bare files, next to SUMMARY.md and book.toml, with nothing saying what each covers.

Changes

  • docs/README.md, which GitHub shows under the folder's files. It groups the guides by part as SUMMARY.md does (Running Forge, Formats, CI and publishing, Releases), gives each a line, and links the site, the README (and its quickstart, for NuGet, which has no guide of its own), DEVELOPMENT.md and the changelog.
  • It stays off the site, which has a start page and a sidebar of its own. Staged, it would be readme.md, which mdBook turns into index.md: the README's name there.
  • cargo xtask docs (xtask/src/docs.rs):
    • no longer counts docs/README.md as a guide SUMMARY.md leaves out;
    • checks its links as a page's (a missing file or heading fails);
    • fails when it does not link a page SUMMARY.md lists, so a new guide cannot be missing from it.
  • DEVELOPMENT.md (Documentation site) and the comment on CI's docs step say so.
  • Changelog fragment: docs/changes/2.1.1/628.docs.md.

Testing

  • cargo xtask docs --check → 12 page(s) of the site, every link resolves.
  • I removed the retention guide's line from docs/README.md, and the check failed with docs/README.md: links no docs/retention.md, which docs/SUMMARY.md lists. I then restored the line.
  • cargo test -p xtask: the new the_docs_index_is_no_page_but_links_every_page covers both sides. An index that links every page passes and is not staged; one with a missing heading, a missing file and two pages left out fails with all four problems, and never with "no page of the site".
  • cargo xtask changelog --check, cargo fmt --all --check, cargo clippy -p xtask --all-targets -- -D warnings.

The site's output does not change: docs/README.md is not staged, so mdBook never sees it. I did not run mdBook itself; --check covers the staging.


Generated by Claude Code

https://github.com/forgepkg/forge/tree/main/docs listed the guides as bare
files, next to SUMMARY.md and book.toml, with nothing saying what each
covers. docs/README.md is that index now: the guides by part, as
SUMMARY.md groups them, a line on each, and links to the site, the README
and the changelog.

It is no page of the site, which has a start page and a sidebar of its
own; staged, it would be readme.md, which mdBook turns into index.md, the
README's name there. `cargo xtask docs` no longer counts it as a guide
SUMMARY.md leaves out, checks its links as a page's, and fails when it
does not link a page SUMMARY.md lists, so a new guide cannot be missing
from it. DEVELOPMENT.md says so.

Fixes #628

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012e6DJbNRFYp72ZsDpL9kCF
@schmitch
schmitch enabled auto-merge October 28, 2026 12:38
@schmitch
schmitch added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit def21a5 Oct 28, 2026
21 checks passed
@schmitch
schmitch deleted the schmitch/sharp-cerf-pkzem8 branch October 28, 2026 12:50
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.

Docs: the docs/ folder on GitHub has no index page, only a list of files

2 participants