Closed micheljung closed 1 year ago
This solves the issue:
tasks {
tasks {
"asciidoctor"(org.asciidoctor.gradle.jvm.AsciidoctorTask::class) {
setBaseDir(sourceDir)
resources(delegateClosureOf<CopySpec> {
from("src/docs/asciidoc/style") {
include("*.css")
exclude("my-asciidoctor.css")
}
into("./")
})
attributes(
mapOf(
"stylesdir" to "style",
"stylesheet" to "my-asciidoctor.css",
),
)
}
}
From Extend the default stylesheet:
However, if you put
asciidoctor.css
next to your stylesheet, the plugin will not copy it tobuild/docs/asciidoc
thus it is not accessible by the browser.