asciidoctor-gradle-plugin icon indicating copy to clipboard operation
asciidoctor-gradle-plugin copied to clipboard

Consider restoring support for include directive with relative path

Open izeye opened this issue 5 years ago • 3 comments

Before Asciidoctor Gradle plugin 2.x, include directive with relative path works but I didn't find any way to achieve the same with Asciidoctor Gradle plugin 2.x. I can change them all to use absolute paths based on {includedir} like this. However, it doesn't feel comfortable as before. Am I missing something? If not, is there any possibility to restore the old behavior?

izeye avatar Oct 11 '19 07:10 izeye

Try using

asciidoctor {
    baseDirFollowsSourceDir()
}

ysb33r avatar Oct 11 '19 08:10 ysb33r

@ysb33r Thanks for the quick feedback! I've already tried it before opening this issue. It works for top-level files but it doesn't work for intermediate (nested) files. For example, in the above referenced link, src/docs/asciidoc/nested_1/index.adoc won't include nested_2/index.adoc in its generated HTML.

izeye avatar Oct 11 '19 09:10 izeye

@izeye I had the same issue as you reported. I created a PR #492 with one possible solution.

lhotari avatar Jan 03 '20 18:01 lhotari