Hello,
I'm new to asciidoc and I'm trying to mutuallise documentation on a Java project.
I must have a html site and a single pdf file that aggregate all pages of the site with
include.
I have managed to create file with maven and asciidoctor plugin.
I have some trouble with link inside my pdf doc.
if I use anchor :
<<Release Note, API Release Notes>>
it work in pdf but not in html as there is no reference to the adoc file.
if I use link or xref
xref:NEWS.adoc#Release-Note[API Release Notes]
it's working on html but not in aggregation pdf.
I have found a way to bypass this by defining and using a variable
ifdef::backend-pdf[]
:NEWSURI: <<Release Note, API Release Notes>>
endif::[]
ifdef::backend-html5[]
:NEWSURI: xref:NEWS.adoc#Release-Note[API Release Notes]
endif::[]
But it is a bit ugly... and really verbose solution.
Is there a (cleaner) way to do this ?
Many thanks for your help..
Best regards,
Nicolas