Follow Antora cross-file cross-references#81
Merged
Merged
Conversation
In an Antora component (a tree with an antora.yml), following an xref to another page - xref:topic/page.adoc[] or xref:other.adoc#a-section[], optionally with a module: prefix - now opens the resolved page (under the target module's pages/ directory) and jumps to the #fragment section, reusing the section auto-id resolver. Works from C-c C-o / M-. and a mouse click, pushes the xref marker stack so M-, returns, and stays out of the way (falls through) outside Antora. Resolution is limited to the current component; version@/cross-component targets are left alone. Phase 2 of the Antora/xref work; completion of xref page targets and project-wide references are still to come.
This was referenced Jun 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 2 of the Antora/xref work, building on the section auto-ids from #80.
In a file inside an Antora component (a tree with an
antora.yml), following anxref:that targets another page now actually goes there.xref:basics/install.adoc[],xref:other.adoc#a-section[], andmodule:page.adocall resolve to the right file under the target module'spages/directory, and the#fragmentjumps to the matching section (reusing the auto-id resolver). It works fromC-c C-o/M-.and a mouse click, pushes the xref marker stack soM-,returns, and stays out of the way outside Antora (a plain.adocxref elsewhere falls through to the in-buffer handling).Resolution is deliberately scoped to the current component -
version@andcomponent:module:cross-component targets need Antora's site catalog, which we don't have, so they're left alone. I verified it against my realcider/docandrubocop/docslayouts.Still to come in later PRs: completion of xref page targets +
#fragments, and project-widexref-find-references; then paste-image.eldev test)M-x checkdocwarnings