Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Hello fellow doc writers,
According to the User Manual you may link to relative files using the following syntax link:name_of_your_file/[caption] I see this syntax being used in Asciidoctor's User Manual itself (https://github.com/asciidoctor/asciidoctor.org/blob/master/docs/user-manual.adoc) so I gave it a try. Problem is that it's not working for me. I have several .adoc files under the same source directory, linking some of them like so link:resources-resource-resolver-configuration/[configuration] where resources-resource-resolver-configuration.adoc is a local file to the current document. The generated HTML link points to "build/asciidoc/resources-resource-resolver-configuration/" as is, no .html suffix. If I write the link in the following fashion instead link:resources-resource-resolver-configuration.adoc/[configuration] then the generated HTML link points to "build/asciidoc/resources-resource-resolver-configuration.adoc/". So I gather the link is taken verbatim. So question is, how can I make relative links work? I'm using asciidoctor-gradle 0.7 based on asciidoctorj 0.1.4 btw. Cheers, Andres |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
In theory it should be supported as described in https://github.com/asciidoctor/asciidoctor/issues/417?source=cc.
I used something similar to reference an external document, you can see in this link https://raw.github.com/lordofthejars/foobank/master/src/main/resources/com/lordofthejars/bank/customer/srs.adoc hope it works for you too. Alex. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Hi Alex,
Sadly the link: macro does not work for .adoc files but it does for any other content. I switched to doc references such as <<ref,caption>> which works for single page docs (or an aggregating index.html) but will certainly fail with a multi-page approach (a page per chapter for example). Oh well, there's always room for improvement ;-) Cheers, Andres |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
On Tue, Jan 21, 2014 at 12:22 PM, aalmiray [via Asciidoctor :: Discussion] <[hidden email]> wrote: I switched to doc references such as <<ref,caption>> which works for single page docs (or an aggregating index.html) but will certainly fail with a multi-page approach (a page per chapter for example). Oh well, there's always room for improvement ;-) Actually, you should be using the <<ref,caption>> syntax for any links that refer to related documents in your own repo. It will handle the case that the documents are standalone or aggregated. Plus, it communicates intent much better. There's information about how it works for the use case in the user manual. Cheers, |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
I had problems using the <<adoc_file.adoc#_ref,caption>> style when it refers to other files that get included into a master file. I have been meaning to create an issue report on github.
Asciidoctor should be able to notice that "adoc_file.adoc" is part of "doc.references[:includes]" and strip the "adoc_file.adoc#" part, instead of me having to use only <<ref,caption>> when building with the master file. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
On Wed, Oct 29, 2014 at 9:16 AM, davidgamba [via Asciidoctor :: Discussion] <[hidden email]> wrote: Asciidoctor should be able to notice that "adoc_file.adoc" is part of "doc.references[:includes]" and strip the "adoc_file.adoc#" part, instead of me having to use only <<ref,caption>> when building with the master file. That's the whole idea of this feature. If there's a case where it's not working, let's get it fixed. |
Free forum by Nabble | Edit this page |