<RelatedReading> presents connections declared in the central relationships config. Use it for prerequisites, next steps, references, related topics, and distinctions that need a reason.
Syntax
<RelatedReading relation="next-step" />
Attributes
Use these attributes to configure the component.
| Attribute | Meaning |
|---|---|
relation |
Select one relationship type; omit for all types grouped by purpose. |
relatedTo |
Source document ID; defaults to this page. It must be available in the current publication. |
layout |
list by default, or cards. Card layout includes card overrides, summaries, and reasons. |
toc Since 1.4.1 |
include (default) or ignore. Controls whether generated group headings appear in the page table of contents. |
empty |
Text for no matches; default is “No matching documents.” Empty groups are omitted. |
This is a standalone empty element. A selected relation has no automatic heading, so give that view a page heading when useful. See related reading for config fields, relationship types, and ordering.
Control the table of contents
Since 1.4.1
Set toc="ignore" to keep the generated group headings out of the page table of contents:
## Related reading
<RelatedReading toc="ignore" />
The groups still have visible level-three headings and anchor links. The authored ## Related reading heading remains in the table of contents. This works with both layout="list" and layout="cards". Omit toc or set toc="include" to include the group headings. Unlike Steps, RelatedReading includes its headings by default.
A relation filter generates no group headings, so toc has no effect on that view. Values other than include and ignore fail the build.
HTML, Markdown, and agents
With layout="list", HTML and Markdown show links with the relationship reasons; layout="cards" adds previews. Only connections whose endpoints are public in the current publication appear. Both layouts export ordinary links and reasons to Markdown, with .md destinations, so agents can follow the same reading paths. The HTML wrapper has the related-reading class for project CSS.
toc="ignore" changes only the HTML page outline. Markdown retains the group headings, links, and reasons, so agents can still read and follow every group. The HTML headings keep their anchor IDs. This setting needs no browser JavaScript.
When a top-level view describes the current page, section Markdown also carries its prerequisite and next-step links if they would otherwise be omitted. A Page reading path label explains the scope. Nested views and views with another relatedTo source stay in their original context. See section reading paths for boundaries and size rules.