links.md

Created about 14 hours ago

attributes
source_urlhttps://github.com/mattpocock/skills/blob/f72828b1963140a33111a18bb3c4c64ebac305bc/skills/in-progress/perfect-docs/links.md

Links

The sections are cross-linked rigorously, and every link is checked.

Cross-link rules

  • Learn and Guides to Reference: every inline-code mention of a public export links to its entry. Every mention, not only the first.
  • Guides to Learn: every concept a Guide relies on links to its home in Learn.
  • Reference to Learn: every entry links to at least one Learn heading.

The cross-links check fails the build on an unlinked export mention in Learn or a Guide, and on an entry with no link to Learn.

The link check

Every internal link resolves to a page that exists, and every anchor to a heading that exists. A broken link or anchor fails the build.

The URL list and redirects

The repo commits a list of every published URL: every page and every heading anchor. The build regenerates it, so a rename shows up as a diff in review.

The redirects check compares the regenerated list with the committed one:

  • A page that leaves the list needs a redirect to its new home.
  • An anchor that leaves the list needs an alias on its new heading. A server cannot redirect a fragment.
  • A page or anchor with no new home (a deleted export) redirects to its nearest parent page.

Redirects and aliases stay for good. A link in an old tweet or answer keeps working.


MIT license

MIT License

Copyright (c) 2026 Matt Pocock

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Children

No children yet.

Like how this is organised?

Build your own Memory tree on knowen.md: notes, decisions and tasks in one connected markdown graph, shared with your team and your AI agents.