Skip to content

Link every heading and finish the terminal type - #35

Merged
barkz merged 1 commit into
mainfrom
feat/heading-anchors
Sep 12, 2026
Merged

barkz merged 1 commit into
mainfrom
feat/heading-anchors

Conversation

@barkz

@barkz barkz commented Sep 12, 2026

Copy link
Copy Markdown
Owner

Heading links

Headings already had ids, so they were addressable but not clickable — you had to read the HTML to find the fragment. Every heading is now a link to itself.

Each one also carries its markdown level as a dim prefix: ## before a section, ### before a subsection. It reads as the source the page is generated from, and the marker encodes something true — the depth — rather than just decorating the line. The prefix picks up the accent colour on hover, which is the affordance that the heading is a link.

A heading that already contains a link is left alone rather than nesting an anchor inside an anchor.

Type

The headings already shared the mono face with the tagline, but not its weight — they sat at 700 against the tagline's 500. They match now.

Table headers are headers too, so Command / What it does move from bold sans to the same mono at a smaller size.

Before After
h1h3 JetBrains Mono 700, −0.035em JetBrains Mono 500, −0.03em
thead th IBM Plex Sans 600 JetBrains Mono 500, 0.84rem

Body prose stays in IBM Plex Sans.

Tests

1,103 → 1,108: a heading links to itself, every level gets an anchor, a heading holding a link isn't double-wrapped, the level markers exist, and both headings and table headers resolve to the mono token.

One existing fixture asserted a bare <h1> and was updated for the new markup.

🤖 Generated with Claude Code


One thing I want to check on intent: I read "make links for each header" as making each heading a link to itself. If you meant a table of contents at the top of the README — a list of links to every section, like the Contents block the rewrite removed — say so and I'll add that instead, or as well.

Headings were already ids, so they were addressable but not clickable
— you had to read the HTML to find the fragment. Each heading is now a
link to itself, and carries its markdown level as a dim prefix: ##
before a section, ### before a subsection. That reads as the source
the page is generated from, and the marker encodes real information,
namely the depth.

Type: the headings shared the mono face with the tagline but not its
weight, sitting at 700 against the tagline's 500. They now match, and
table headers — headers too — move from bold sans to the same mono.

A heading that already contains a link is left alone rather than
nesting one anchor inside another.

Tests: 1,103 -> 1,108.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@barkz
barkz merged commit 3c076dc into main Sep 12, 2026
7 checks passed
@barkz
barkz deleted the feat/heading-anchors branch September 12, 2026 03: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