Open gernotstarke opened 6 years ago
I have very little experience with Gradle, but this extension works in scope of Asciidoctor engine and has no knowledge about how it is executed: as part of Gradle build or directly in command line. Gradle build integration is handled by asciidoctor-gradle-plugin: https://github.com/asciidoctor/asciidoctor-gradle-plugin . Does it have information you are looking for? Maybe you encounter some kind of error? Or are there problems configuring build to add monotree as asciidoctor extension?
see my PR - I provided some short instructions.
I try to use monotree with asciidoctorj and gradle-plugin 2.x, but have no success with it. The tree is not rendered. The input is copied directly to the output (html).
.Beispiel der Struktur des `maven` Virtual Repositories
[tree]
----
> A
>> B
>>> C
>> E
>>> F
----
Here is my build.gradle
plugins {
id 'java'
id "idea"
id "maven-publish"
id 'org.asciidoctor.jvm.convert' version '2.4.0'
id 'org.asciidoctor.jvm.pdf' version '2.4.0'
}
repositories {
maven {
url("${artifactoryContextUrl}/maven/")
}
}
wrapper.gradleVersion = '5.6.4'
wrapper.distributionType = 'bin'
group = 'de.hmmh.itsqs'
version = "1.0.1${new Date().format('_yy_MM_dd_HH_mm')}-SNAPSHOT"
build.dependsOn asciidoctor
asciidoctorj {
version '2.2.0'
options doctype: 'article',
header_footer: true
attributes sourcedir:'docker',
'highlightjs-theme':'mono-blue',
'url-jenkins-master':'http://jenkins-qs3.x.y/',
'url-artifactory': 'https://artifactory.x.y',
'source-highlighter': 'highlightjs',
'doctype': 'book',
'encoding': 'utf-8',
'lang': 'de',
'toc': 'left',
'toclevels': '4',
'numbered': '',
'icons': 'font',
'docinfo': 'private-footer',
'nofooter': '',
'repo-path' : 'https://bitbucketx.y/projects/Z3ITSQS/repos/ci_dubai/browse/documents'
modules {
diagram.version '2.0.0'
}
}
// https://asciidoctor.github.io/asciidoctor-gradle-plugin/development-2.0/user-guide/
asciidoctor {
baseDirFollowsSourceDir()
outputOptions {
backends=['html5']
separateOutputDirs=true
}
sourceDir file('documents')
sources {
include '*.adoc', '*/**/*.adoc' //TODO: WTF?
}
resources {
from(sourceDir) {
include '*/**/assets/**/*' , '*/**/highlight/**/*'
}
}
outputDir file('build/documents')
}
dependencies {
compile 'com.github.allati.asciidoctor.monotree:asciidoctor-extension-monotree:0.0.1'
}
I tried to use monotree in a gradle-build asciidoc documentation - but failed (so far).
Before I start to experiment - do you have any idea or example that I might re-use?
thx, Gernot