THE GITHTML FIELD GUIDE
Use reference-style Markdown links without broken labels
Use a named reference link when a destination appears repeatedly or would make a paragraph difficult to read in source form. Define that label once and keep it meaningful. Check the rendered destination after edits: a readable source paragraph does not guarantee that its reference definition exists or points to the intended page.
Use labels to express the destination's role
Reference-style links separate the sentence readers see from the destination authors maintain. This is helpful in a long installation guide that repeatedly links to one compatibility policy. Choose labels such as supported-platforms or upload-limits instead of link-one. The label is an authoring aid, not the visible promise to the reader. Keep visible link text specific enough to make sense in the paragraph. If two destinations describe different product versions, assign different labels even when their display names are similar. Reusing a convenient label for unrelated targets makes a later global edit surprisingly dangerous.
Put definitions where reviewers can find them
Collect a small set of definitions at the end of the section or document, according to the project's convention. The example uses one repeated reference for a support page. Use one authoritative definition per label and remove stale definitions after deleting their last use. Do not assume a typo in a reference label will generate a build error; some renderers simply leave the source-like text visible. Search for the label when changing a destination to understand every affected sentence. If the destination's meaning has changed, update those sentences rather than just replacing the URL.
Read the [support policy][supported-platforms].
Check [platform coverage][supported-platforms] before installing.
[supported-platforms]: https://example.com/support/platformsReview links as statements about content
Render the document and follow each distinct destination. Confirm that the destination supports the surrounding claim, not merely that it returns a successful page. A link called supported versions should not lead to a generic project homepage. For release-specific documentation, identify the appropriate versioned destination before updating all references. Check that unused labels do not conceal an abandoned migration. When exporting the Markdown, compare both link text and destination in the result. This review is especially important when the same source feeds more than one publication system with different relative-link transformations. During cleanup, retain definitions that serve another section. A reference list is a shared dependency within the document, so deleting an apparently unused destination requires checking the whole file first.
- Give each definition a role-based label and keep one destination per label.
- Search every use before changing a shared reference so all affected sentences remain accurate.
- Preview a deliberately misspelled label in a scratch copy to learn whether your build detects missing definitions.
Sources and further reading
AI-assisted writing with source-linked guidance and illustrative examples. Read our editorial approach or report a correction.