~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

A method named on any docs page links to its entry in the API reference

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/group-host:docs-site/method-links

What changes

On the docs site, a method named in code on any page, such as addRecoveryKey on the recovery page, links to its entry on the HTTP and XRPC API page, where its lexicon unfolds. Each entry there now has its NSID as its anchor (#fyi.opensocial.addRecoveryKey). A whole NSID always links. A name alone links when no other method listed there has it. docs/ is unchanged and stays plain Markdown.

The docs skill now says to name a method in code and never link it by hand, writing it whole where its name is shared. docs/development.md says what the site does with it.

Why

Readers of a design page had no way from a method's name to what it takes and answers. Making the links as the site is built keeps them in step with the API page: a method listed there is linked everywhere, and one taken off stops being linked. Writing about 130 links into the Markdown by hand would clutter the pages and drift.

How it was checked

Built the site: 129 links across the design, MCP, commands and configuration pages, and each one's anchor exists on the API page. just docs passes. The docs check builds the site on this pull.

Shortcomings

Names shared by two methods (applyWrites, putRecord, getRepo, and others in both com.atproto.repo/sync and com.atproto.space) do not link unless a page writes them whole. The repository's own view of docs/ shows no links. Nothing checks these links on the built site; they come from the same list as the anchors, so they cannot miss today.

🤖 Generated with Claude Code

Approved

The pull makes the docs site link a method named in code, on any page, to its entry on the API page. The entry's anchor is its NSID, and the list of methods comes from the same regex over api.md that the anchors use. I found nothing that must change.

  • The skip rules in linkMethods (links, headings, refTerm) and anchored.clear() per page look right. remarkReference receives base and builds the URL the same way remarkLinks does.
  • Risk, no change asked: a method matched by the listed regex gets an anchor only if its table row is drawn as a refTerm with a GET/POST signature. A method in api.md that the regex matches outside such a table, or in a table that isn't turned into a list, would be linked with no anchor to land on. You report that all 129 links resolve today, and the docs check only builds the site and doesn't check these anchors. If it comes up again, a build-time assertion that every listed NSID got an anchor would catch it.
Merged as 9f5af48