Links
The source of this chapter links to other chapters by their .md paths:
In the output:
- HTML links point at
.htmlpages, as usual for mdBook. - Per-chapter
.mdfiles keep relative.mdlinks. A link to aREADME.mdchapter is changed toindex.md, its published path. llms-full.txthas every chapter in one file, so the links are rewritten to work from there.
Broken links
After the build, mdbook-llms checks the relative links in llms.txt and in every chapter’s .md file. A missing target, such as a typo or a chapter left out of SUMMARY.md, prints a warning like this and the build carries on:
warning: mdbook-llms: broken link in example/links.md: nowhere.md
Anchors and external URLs are not checked. This repository’s just snapshot treats these warnings as errors.
Limitation: links to README.md
mdBook publishes a README.md chapter as index.html, but its HTML renderer does not rewrite links to it. A link like [Overview](README.md) becomes README.html, which does not exist, so it is broken in the HTML site.
mdbook-llms changes these links to index.md in its own output, but cannot fix the HTML. This book avoids linking to README.md chapters for that reason.