Auto-linking every occurrence of a defined word is the obvious version and it reads as machine-generated by the third paragraph. Marking the occurrence that matters is a small amount of work at exactly the moment you know which one it is.
Once the link is a real reference rather than a string match, the term page can list every post that points at it — and that list is a query, not an index I maintain. The whole thing stays a deep module because nothing outside it knows how the reverse direction is computed.
---
title: "A glossary that links itself"
description: "Marking a term by hand beats detecting every occurrence of it, and the reverse direction comes free."
url: "https://lateano.com/writing/a-glossary-that-links-itself"
author: "Colin Lateano"
published: "2026-07-16"
tags:
- title: "How I work"
url: "https://lateano.com/tags/how-i-work"
---
# A glossary that links itself
Marking a term by hand beats detecting every occurrence of it, and the reverse direction comes free.
Auto-linking every occurrence of a defined word is the obvious version and it reads as machine-generated by the third paragraph. Marking the occurrence that matters is a small amount of work at exactly the moment you know which one it is.
Once the link is a real reference rather than a string match, the term page can list every post that points at it — and that list is a query, not an index I maintain. The whole thing stays a [deep module](/glossary/deep-module) because nothing outside it knows how the reverse direction is computed.
```groq
*[_type == "post" && references($termId)]{ title, slug, publishDate }
```