Issue with examples-relative directory path replaced with relative path token ./
antora --version
@antora/cli: 3.1.10
@antora/site-generator: 3.1.10
I am trying to use the feature described here: https://docs.antora.org/antora/latest/page/include-an-example/
In special circumstances where the examples-relative directory path of the target example and the pages-relative directory path of the current page are parallel, the examples-relative directory path can be replaced with the relative path token, ./.
Consider this demo module layout with a sub folder in both the pages and examples directories:
modules/demo/nav.adoc
modules/demo/pages/sub/index.adoc
modules/demo/examples/sub/job.yml
With this content for each file:
modules/demo/nav.adoc
* xref:sub/index.adoc[demo]
modules/demo/examples/sub/job.yml
title: demo
If I use a relative path token to reference job.yml then antora throws an error:
$ cat modules/demo/pages/sub/index.adoc
[,yaml]
----
include::example$./job.yml[]
----
$ antora antora-playbook.yml
[11:17:15.159] ERROR (asciidoctor): target of include not found: example$./job.yml
file: /project/docs/modules/demo/pages/sub/index.adoc:3
source: /project (branch: master <worktree> | start path: docs)
It works if I use the full example path:
$ cat modules/demo/pages/sub/index.adoc
[,yaml]
----
include::example$sub/job.yml[]
----
$ antora antora-playbook.yml
Site generation complete!
Apologies if I misunderstood the documentation.