Backlinks#
Every note ends with Mentioned in: the notes that link to it, each quoting the sentence the link appeared in.
The quote is the point. A list of titles tells you that four notes mention this one. It does not tell you whether they mention it in passing or argue with it, and you have to open all four to find out. A sentence answers that before you click.
How the sentence is chosen#
When a [[link]] is parsed, mdssg records where it sits inside the plain text
of its block. Building a backlink means walking outward from that position to
the nearest sentence boundary in each direction, capping the result at 240
characters, and remembering where the mention was so it can be marked.
What gets stored is plain text plus two offsets — never HTML. Truncated HTML leaves unbalanced tags, and the highlight is trivial to reapply at render time. It also means raw HTML an author embedded in a paragraph is dropped from the excerpt rather than escaped into it: a quote is prose, not markup.
If a note mentions the same target repeatedly, the first two quotes are kept. One note with forty mentions should not push everything else off the page.
Sources are ordered newest first, undated notes last, then by slug — never by the order the filesystem returned them, which differs between NTFS and ext4 and would make the same site build differently on different machines.
Self-links are not backlinks#
A note that mentions its own name does not appear in its own panel.
Related notes are a different question#
Backlinks answer "who points at this?". Related Notes answer "what else is about this?", which is a question no link can answer directly.