Skip to content

Generate the terms page from TERMS.md, and preserve existing anchors - #9

Merged
ericgriffin merged 1 commit into
mainfrom
ericgriffin/legal-terms-and-anchors
Sep 22, 2026
Merged

ericgriffin merged 1 commit into
mainfrom
ericgriffin/legal-terms-and-anchors

Conversation

@ericgriffin

Copy link
Copy Markdown
Member

Summary

Follow-up to #8. Extends the sync to terms/index.html, and fixes an anchor
problem the renderer in #8 would have caused.

The anchor bug, which is the important part

Anchors are a published interface: the site's own cross-links and any external
link point at them. The hand-written pages used short ids (acceptance,
warranties, third-party) that a slug of the full heading does not
reproduce.

Generating the terms page blind would have broken 9 of its 13 anchors, and
#8 had already changed changes to changes-to-this-policy on the privacy
page without anyone noticing.

The renderer now reads the ids off the page before replacing it and reuses the
one an unchanged heading already has. No mapping file to maintain, and a
heading whose text genuinely changed still gets a fresh slug, which is correct
because it is a different section.

Anchor sets diffed against origin/main:

Page Anchors before After Lost
terms 13 13 none
privacy 11 14 cloud-backup only

cloud-backup is a genuine loss rather than a regression: the policy rewrite
restructured that section into "Backup and Sync" and "Photo and Video Upload".
A link to #cloud-backup still lands on the page, just unscrolled.

Terms had drifted too

Less visibly than privacy. TERMS.md says "Terms of Use" throughout where this
page said "Terms of Service". Otherwise the two agree: comparing the body text
against the old page gives 99.4% identity, and every difference is that one
wording change coming from the source.

Workflow

Renders both pages and commits them together, so two renders cannot race each
other pushing to the same branch. The --check job on pull requests now covers
both pages and reports each failure against its own file.

Verification

  • Both pages rendered from live fetches of the same URLs the workflow uses, and
    --check clean afterwards
  • Rendering twice is byte-identical, so scheduled runs will not produce no-op
    commits
  • Both pages parse with balanced tags; section counts match their sources
    (privacy 14 headings / 3 tables / 30 items, terms 13 headings / 11 items)
  • Terms body text compared against the old page as described above

One thing to decide, not changed here

The terms body now says "Terms of Use", following the source, while the page's
hand-written title, the nav links and the footer still say "Terms of Service".
Those now disagree. Resolving it is a naming decision rather than a sync one:
either rename the site chrome to match the source, or change TERMS.md.

Extends the privacy sync to terms/index.html, and fixes an anchor problem
the first version of the renderer would have caused.

Anchors are a published interface: the site's own cross-links and any
external link point at them. The hand-written pages used short ids
(`acceptance`, `warranties`, `third-party`) that a slug of the full heading
does not reproduce, so generating blind would have broken 9 of the terms
page's 13 anchors, and had already changed `changes` to
`changes-to-this-policy` on the privacy page.

The renderer now reads the ids off the page before replacing it and reuses
the one an unchanged heading already has. No mapping file to maintain, and a
heading whose text genuinely changed still gets a fresh slug, which is
correct because it is a different section.

Result: terms keeps all 13 anchors, and privacy now loses only
`cloud-backup`, whose section was genuinely restructured into "Backup and
Sync" and "Photo and Video Upload" by the policy rewrite.

Terms had drifted too, less visibly than privacy: TERMS.md says "Terms of
Use" throughout where this page said "Terms of Service". The generated body
now follows the source. Note that the page's hand-written title, the nav and
the footer still say "Terms of Service", so those two now disagree; which
way to resolve it is a naming decision, not a sync one, and is left alone
here.

The sync workflow renders both pages and commits them together, so two
renders cannot race each other pushing to the same branch.
@ericgriffin
ericgriffin merged commit 74fc4ca into main Sep 22, 2026
2 checks passed
@ericgriffin
ericgriffin deleted the ericgriffin/legal-terms-and-anchors branch September 22, 2026 23:57
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