THE GITHTML FIELD GUIDE

Check Markdown section links before sharing a README

Create a same-page link using the fragment generated by the renderer, then test it in the actual preview. Do not guess how punctuation, Unicode, or repeated words are transformed. Keep headings descriptive and review section links whenever a heading changes, because a harmless-looking copy edit can break navigation.

Choose the section that answers the linked question

A link is most useful when it lands where the promised answer begins. Avoid pointing every mention of configuration to a large generic section if a smaller subsection explains the specific setting. Write the heading around the reader's task, then obtain its generated fragment from the preview. A manual table of contents should contain only useful waypoints rather than every minor heading. If the generator already creates navigation, decide whether another hand-maintained list is worth the upkeep. Keep one authoritative navigation approach unless readers genuinely benefit from a short task-specific route at the top.

Use a real rendered fragment as the source of truth

The illustrative fixture shows a simple heading whose fragment is easy to understand, but real headings often contain punctuation or non-English text. Copy the section link from the target surface rather than predicting its transformation rules. Test the link after changing capitalization, punctuation, or the heading's wording. If the same Markdown feeds both GitHub and a documentation site, compare their generated identifiers before claiming one fragment works everywhere. Explicit identifiers may be available in a particular processor, but they are an extension choice that must be documented. Do not add unsupported anchor syntax merely because another project uses it.

markdown
[Check the sample configuration](#check-the-sample-configuration)

## Check the sample configuration

Confirm the expected sample values.

Review navigation as part of content editing

Click every manual section link after a heading edit, including links arriving from sibling pages. Confirm the destination, not merely that the browser updates its address. A fragment can exist but point to the wrong repeated heading. Keep an inventory of high-value links used in support answers or onboarding messages when the guide is widely shared. If you must rename an important section, use the publishing system's supported compatibility mechanism or communicate the change. Test the exported HTML independently when one is produced. gitHtml can read that HTML artifact, but it does not repair Markdown fragments or generate anchors from the source file. For a frequently shared README, include section-link testing in the content review checklist. This makes navigation ownership visible instead of depending on someone noticing a broken support link later.

  1. Write descriptive headings before building a manual contents list.
  2. Copy each fragment from the actual renderer and follow the resulting link.
  3. Recheck links after any heading change, including punctuation-only edits.
  4. Check both in-page navigation and known links arriving from other documents.

Sources and further reading

AI-assisted writing with source-linked guidance and illustrative examples. Read our editorial approach or report a correction.

All markdown and readme files guides →

Read as MarkdownAll guides

Check Markdown section links before sharing a README · gitHtml