|
9 | 9 |
|
10 | 10 | Breadcrumbs are included in the symbol template as an alternative. |
11 | 11 | }} |
12 | | -= {{> symbol/qualified-name symbol nolink=true }} |
| 12 | += {{> symbol/qualified-name symbol }} |
| 13 | +{{! |
| 14 | + Antora does not support relative links to pages in |
| 15 | + parent directories. Therefore, unlike in HTML templates, |
| 16 | + links are not relativized. |
| 17 | +
|
| 18 | + However, while Antora interprets xref as relative |
| 19 | + to the root of the module, these xref are |
| 20 | + interpreted as relative to the current directory |
| 21 | + because it has no concept of modules. This means |
| 22 | + links would be broken with either Antora or Asciidoc. |
| 23 | +
|
| 24 | + Even more, Antora uses the same rule as Asciidoc |
| 25 | + for breadcrumbs and the page title, where links |
| 26 | + would also be broken. |
| 27 | +
|
| 28 | + The solution is to set the relfileprefix attribute, |
| 29 | + which includes the relative location of the root |
| 30 | + directory and makes all links relative to it. |
| 31 | +
|
| 32 | + This relfileprefix affects Asciidoc links, the |
| 33 | + Antora title, and the Antora breadcrumbs. |
| 34 | +
|
| 35 | + See https://docs.asciidoctor.org/asciidoc/latest/macros/inter-document-xref/#mapping-references-to-a-different-structure |
| 36 | +}} |
| 37 | +:relfileprefix: {{{ repeat "../" (count (remove_prefix symbol.url '/') '/') }}} |
13 | 38 | {{else}} |
14 | 39 | {{! Single page documentation: symbol is not available to the wrapper }} |
15 | 40 | = Reference |
|
0 commit comments