add the following configuration to build.gradle:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.0'
}
}
apply plugin: 'org.asciidoctor.gradle.asciidoctor'
and put your AsciiDoctor files into the src/asciidoc directory.
Run the 'asciidoctor' task.
Then you can find your output files in the build/asciidoc directory.
To use an 'include' directive with a remote file,
you should add the following configuration to build.gradle.
asciidoctor {
options = [
attributes: [
'allow-uri-read': ''
]
]
}
References:
http://asciidoctor.org/docs/asciidoctor-gradle-plugin/
https://github.com/asciidoctor/asciidoctor-gradle-plugin
https://github.com/asciidoctor/asciidoctor-gradle-plugin/issues/146
http://asciidoctor.org/docs/user-manual/#include-content-from-a-uri
http://asciidoctor.org/docs/user-manual/#running-asciidoctor-securely
No comments:
Post a Comment