Reputation: 37
I am using spring docs 2.0.5 release version I am using gradle 8.6, and i refer to this example to configure asciidoctor -i refered below link
https://github.com/spring-projects/spring-restdocs-samples/blob/main/restful-notes-spring-hateoas/build.gradle
test {
useJUnitPlatform()
outputs.dir snippetsDir
}
asciidoctor {
configurations "asciidoctorExtensions"
inputs.dir snippetsDir
dependsOn test
doLast {
copy{
from ("${asciidoctor.outputDir}/html5")
into "$buildDir/resources/main/public/docs")
include "**/*.html"
}
I am getting below error when i try to load index.HTML.
The public/docs folder has index.html,child.html,child1.html etc
THe child.html,child1.html are referred inside the index.adoc
i get below error on the console
Unresolved directive in index.adoc - include::child.adoc[]
Unresolved directive in index.adoc - include::child1.adoc[]
I tried changing the buildDir to project.layout as buildDir is deprecated in 8.6
Upvotes: 1
Views: 49
Reputation: 37
Follow this link - github.com/asciidoctor/asciidoctor-gradle-plugin/issues/549 . Adding asciidoctor.baseDirFollowsSourceDir() in the asciidoctor task should fix the problem.
Upvotes: 0