-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broken links in breadcrumbs outside nav #372
Comments
I've been investigating this issue. The problem is that Asciidoc and Antora have different behaviors for xrefs and, to make it worse, Antora uses the Asciidoc behavior for the title. So Antora doesn't support relative paths, and all xrefs must be relative to the module pages. So On the other hand, Asciidoc supports relative paths and paths are rendered relative to the current page. So These two things are not the same. So unless all pages are in the root module pages, we would have broken links either in Antora or Asciidoc. To make things worse, Antora uses the default Asciidoc behavior for the title, so
would render as The solution I found was to set the relfileprefix attribute. The attribute prepends all xrefs with some prefix (like "../", etc). This fixes the problem with Asciidoc. The solution isn't supposed to be needed in Antora, but it also fixes the problem with titles and breadcrumbs. So this issue becomes less urgent now that we don't have broken links for the boost documentation 1.87. It's still worth checking the rules the Antora UI uses to render these breadcrumbs and title and see if there's something we can do about it in the general case. I think most people don't ever have this issue because they don't include links in the title, but MrDocs does. |
Thanks for the info, I think I'll move this to a priority 3 for now, as it shouldn't affect the release, or break anything in the near term related to getting the launch done. |
Adding the zulip link for reference: https://antora.zulipchat.com/#narrow/channel/282400-users/topic/Relative.20xrefs |
When pages are not in the nav.adoc, the Antora UI creates broken links in the breadcrumbs and page titles.
To replicate the issue include the following files in any project:
The links in B will be broken in the breadcrumbs and the title, but not in the content of the B.adoc file.
The text was updated successfully, but these errors were encountered: