Skip to content

docs: remove intro sentences that restate the page description - #382

Merged
JoshKappler merged 3 commits into
mainfrom
docs/dedupe-description-intros
Jul 18, 2026
Merged

docs: remove intro sentences that restate the page description#382
JoshKappler merged 3 commits into
mainfrom
docs/dedupe-description-intros

Conversation

@JoshKappler

Copy link
Copy Markdown
Contributor

The docs layout renders each page's frontmatter description directly under the title. 56 pages also opened the body by restating that sentence, so readers saw it twice in a row. Machine-translated locales make it worse: the two copies translate independently and render as two different sentences saying the same thing back to back (reported on /it/docs/python/reference/functions/declare-var).

What this changes:

  • Rewrites or trims the opening of 56 pages so the body starts with something the description does not already say. Echo sentences were deleted where the rest of the paragraph stood on its own; openings were rewritten where needed. Every inline link survives.
  • Adds the missing rule to DOCS-SKILL.md (Page structure item 2, plus a consistency-check bullet), in the same spirit as fix(docs): remove duplicate page titles #378's duplicate-title rule, so newly authored pages stop reproducing the pattern.
  • About two dozen flagged pages were checked and deliberately left alone because their intros add real content beyond the description.

Root cause: the skill required reference descriptions to summarize the page, required the intro to state what the page is, and never said the layout already renders the description. Pages authored to the guide during the refactor wrote the same sentence twice.

How it was verified:

  • validate:unsafe-html (414 files), validate-links (368 files), the scripts tests, and a full pnpm build:content (430/430 pages) pass on this branch.
  • Built HTML spot checks (declare_var, useLocales, formatList, gt init) show title, description once, then the new intro. The echo is gone.
  • Two independent review passes ran over the full diff; their findings (a dangling pronoun, three inconsistently skipped pages, rule wording) are fixed in the last commit.

Notes:

The docs layout already renders the frontmatter description beneath the
page title, so intros that repeated it displayed the same line twice.
Across 53 pages, removed or rewrote those opening restatements so the
body now opens with new detail. Machine translation rendered the
duplicate copies inconsistently, which this also resolves.
Fixes a dangling pronoun, sweeps three more pages that broke the new
rule, tightens the DOCS-SKILL intro wording, and adjusts openers for
consistency across sibling reference pages.

@pie575 pie575 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@JoshKappler
JoshKappler merged commit 2a3d3c9 into main Jul 18, 2026
7 checks passed
@JoshKappler
JoshKappler deleted the docs/dedupe-description-intros branch July 18, 2026 23:24
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.

2 participants