InkMomentum

Markdown · By Seth ·

Use reference links when URLs interrupt the writing

A paragraph with several long URLs can be awkward to edit in source form. The sentences keep disappearing between addresses.

Markdown reference links let you put the destination definitions elsewhere in the same document. The rendered text can stay the same while the working source becomes easier to read.

Give the destination a short label

Here is a complete example:

Check the [Markdown specification][commonmark] before
relying on a parser-specific feature.

[commonmark]: https://spec.commonmark.org/0.31.2/

The bracketed label connects the link text to its definition. Keep both parts in the document. A missing definition can leave what you intended as a link displayed as plain text.

Use labels that help you edit: commonmark says more than link7. You can reuse a definition when several passages point to the same destination.

Keep the reader’s label specific

The internal reference label is for the source author. The visible phrase still needs to tell the reader what they will open.

“Markdown specification” is useful link text. “This page” becomes harder to interpret when a paragraph is moved or read on its own.

Reference links do not make an unreliable source more reliable. They only change how you write the link in Markdown.

Put definitions where you can maintain them

For a short article, a group of definitions at the bottom is easy to find. A long document may benefit from definitions near the relevant sections. Choose a consistent arrangement that the people editing it understand.

When copying a passage into a new file, bring along the definitions it needs. The visible words alone may look complete even when the connection is missing.

Check for old definitions after deleting a section. They may be harmless, but a large collection of unused destinations makes maintenance more confusing.

Review the destination before changing it

One definition can serve several links. That is convenient until a replacement URL has a narrower meaning than the original.

Read each passage using the definition before updating it. Confirm that the new page supports what the sentence says. Then preview and follow the links in the finished document.

Inline links are still a good choice for a short note with one destination. Use reference links when they improve the source you actually work in.

Source

Keep exploring

See Markdown portability for checks when moving between tools.