Cross-Page References
Link to reference entries on other pages with :ref, list a whole docs set's entries with :::index{scope="set"}, and how the sync checks and stores them.
Cross-Page References
payload-markdown's reference directives work on one page: a docs-table row or an :::entry
block is an entry with a stable id, :ref[…] links to an entry by name, and :::index lists
the entries of the page. pmdocs makes them work across a docs site:
:refresolves to entries on other pages of the docs set, then of the site's other docs sets;:::index{scope="set"}lists the entries of every page of the docs set;- the sync reports a
:refthat resolves nowhere, like a broken link; - each page's headings and entries are stored at sync (the page outline), for the page rail,
llms-full.txtand thedocsFindMCP tool.
The Markdown stays self-contained: a page names what it links to, and nothing is fetched while it
renders. These features need payload-markdown 1.9.2 or later (entries, :ref, :::index).
:ref to other pages
Write the reference as on a single page; pmdocs answers what the page cannot:
1Set the retention with :ref[orbit prune --keep], and see :ref[remote add] for new replicas.
payload-markdown first matches the target against the page's own entries and headings. A target
it does not find is looked up, with the same rules (directive spec inline.ref), in:
- the other pages of the same docs set, in sidebar order;
- the published pages of the site's other docs sets.
Within each step the best match wins: the entry's explicit fact id, then its key, then the
entry whose table caption and path the target covers most completely. Equal matches go to the
first page in sidebar order. The link goes to the entry's row (/docs/reference/cli#orbit-prune-keep),
with the entry's summary as its title. A target that starts with # names an id on the page
itself and is never looked up elsewhere.
Name an entry precisely enough to be unique on the site: orbit prune --keep rather than
--keep when several commands have a --keep. A reference the site cannot resolve renders as
plain text.
Apps that render docs pages with PayloadMarkdownDocsPage get this without configuration. A
resolve.ref the app passes in rendererProps is still asked for targets pmdocs does not know,
for example links into documentation hosted elsewhere (Route Adapter).
A docs set index
1:::index[All options]{kind="option" scope="set"}2:::3 4:::index[Deprecated]{scope="set" deprecated}5:::
scope="set" lists the entries of every page of the docs set, grouped by page and table caption,
in sidebar order. kind, since, deprecated, sort and the label work as on a page index
(payload-markdown: Entry Index).
scope="page" is the default and leaves the block to payload-markdown.
A set index renders as ordinary Markdown: a list of links to the entry rows, with each summary
as text. theme, palette and #id apply to page indexes only.
payload-markdown's own checker (check_payload_markdown_doc.py in its skill) does not know
scope and reports unknown attribute on index: scope; in a pmdocs docs package that finding is
expected. The sync checks validate the block's other attributes as payload-markdown does.
What the sync checks
Every sync renders the pages it changes (Markdown diagnostics). With references, it also:
- resolves each
:refof a rendered page against the outlines of the docs set after this sync (pages rendered now, or the stored outline of a page this sync leaves as is) and of the other published docs sets; - reports a target that nothing has as payload-markdown's
unresolved-ref(a warning, likebroken_link). Under strict checks it fails the sync, and nothing is written; - checks a set index like a page index, without
index-empty(which is about the page).
1guide.md:14:9 warning unresolved-ref Reference "orbit prune --nope" matches no entry or heading on this page; it is rendered as text.
The message is payload-markdown's; pmdocs reports it only after the docs set and the other docs sets had no match either.
Pages a reference needs that have no stored outline yet (pages synced before 1.5, see below) are rendered once for their entries, within the request's render budget.
Page outlines
At sync, each page the checks render gets an outline stored on its docs record (the outline
field): its headings and its reference entries, generic for any kind of entry (name, path, kind,
summary, since, deprecated, table caption and the row id). It is what the other pages, the
page rail, llms-full.txt and docsFind read. Nothing else depends on it: a page without an
outline still renders, it just cannot be the target of a cross-page :ref or part of a set index.
- A page created or changed by a sync gets the outline of its new content, or none when the checks
did not render it (
sync.diagnostics: false, or a render budget that ran out). - An unchanged page keeps its outline. When a sync renders it anyway (a full check, a reference that needs it) and the outline is missing or outdated, only the outline is written, without a new version.
- After upgrading, one full check fills in every page:
pmdocs push --full-check(or a sync with strict checks, which always checks every page).
Elsewhere
- Docs pages: a right-hand rail lists the page's headings and entries; opening a link to a collapsed row reveals it (Route Adapter).
llms-full.txt::refbecomes a Markdown link,:::indexblocks become the lists they show, and a closingReference Indexlists every entry of the docs set with its URL.- MCP:
docsFindwithsymbollooks up entries across the site (MCP).