Skip to content

docs: give this project a documentation site, built the way that actually works - #61

Merged
webdevsamran merged 1 commit into
mainfrom
docs/site
Sep 9, 2026
Merged

docs: give this project a documentation site, built the way that actually works#61
webdevsamran merged 1 commit into
mainfrom
docs/site

Conversation

@webdevsamran

Copy link
Copy Markdown
Owner

This was the one repository in the family with no docs site at all — no mkdocs.yml, no Pages workflow, nine loose files browsable only on GitHub.

Porting it found a live bug in the source it was ported from

The setup comes from devrepro-doctor, but not as it stood. I wrote the same include pattern here first, hit a failure, and went back to ask whether it had ever worked there.

It hadn't. Every --8<-- include in that project used a ../ path — which pymdownx.snippets refuses because it escapes base_path — and check_paths: false made the refusal silent. Its published site had been serving Architecture, Roadmap, Contributing and five other pages as 68 words of navigation chrome. Fixed separately in devrepro-doctor#35.

So this site is built the way that works

  • base_path at the repository root, with includes that stay inside it.
  • check_paths: true — a missing snippet fails the build rather than quietly producing an empty page.
  • Root documents stay the single source of truth; the site includes them rather than copying them.

The content check, and what I got wrong in it

scripts/check_docs_site.py asserts the built site has content. My first version used a flat 120-word threshold and reported docs/sdk.md (18 lines, mostly a code block) and docs/spec-support.md as broken — both are simply terse.

The threshold is now split by page kind, because the defect being guarded is an include resolving to nothing: include-backed pages get the strict bar, everything else only has to be non-blank. Tuning a global number would have papered over the distinction.

The pin checker caught me

scripts/check_action_pins.py — added earlier in this run — rejected two invented SHAs in this very workflow. I had typed the Pages action pins from memory instead of copying them, and neither resolved to any tag.

That is the check doing exactly what it was written for, to exactly the mistake it was written for, on its author.

Verification

Gate Result
ruff / ruff format --check clean, 133 files
mypy clean, 90 source files
pytest 436 passed
mkdocs build --strict 20 pages
check_docs_site.py all 20 carry real content
check_action_pins.py 34 pins verified

…ally works

This was the one repository in the family with no docs site at all: no
mkdocs.yml, no Pages workflow, nine loose files browsable only on GitHub.

The setup is ported from devrepro-doctor, but not as it stood. Porting it is
what revealed that devrepro-doctor's own site had been publishing empty pages
for months: every `--8<--` include there used a `../` path, which
pymdownx.snippets refuses because it escapes base_path, and `check_paths:
false` made the refusal silent. I wrote the same broken pattern here first,
hit the same failure, and went back to check whether it had ever worked there.
It had not.

So this site uses base_path at the repository root with includes that stay
inside it, and `check_paths: true` so a missing snippet fails the build rather
than quietly producing a page of navigation chrome. Root documents stay the
single source of truth; the site includes them rather than copying them.

scripts/check_docs_site.py asserts the built site has content. Its threshold is
split by page kind, which the first version got wrong: a flat 120-word bar
reported docs/sdk.md (18 lines, mostly a code block) and docs/spec-support.md
as broken when both are simply terse. The defect being guarded is an include
resolving to nothing, so include-backed pages get the strict bar and everything
else only has to be non-blank.

Worth recording: my own scripts/check_action_pins.py caught two invented SHAs
in this workflow. I had typed the Pages action pins from memory instead of
copying them, and neither resolved to any tag. That is exactly the check it
was written for, catching exactly the mistake it was written for, on its
author.

20 pages build, all carrying real content, and the README links the site.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

API Verity — contract review

One comment per PR — updated on each push.

@webdevsamran
webdevsamran merged commit 66bfea1 into main Sep 9, 2026
15 checks passed
@webdevsamran
webdevsamran deleted the docs/site branch September 9, 2026 12:07
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