Permalink
Browse files

allow externalization of AsciiDoc engine attributes

  • Loading branch information...
1 parent 6453f00 commit 75fe1586ea1dcdbf39a96be76da99fe9698711b6 @graemerocher graemerocher committed Sep 28, 2016
@@ -310,7 +310,11 @@ class DocPublisher {
// pass attributes to asciidoc
((AsciiDocEngine)engine).attributes.putAll(
version: version,
- apiDocs: "http://docs.grails.org/${version}/api/"
+ apiDocs: "http://docs.grails.org/${version}/api/",
+ sourceRepo: sourceRepo
+ )
+ ((AsciiDocEngine)engine).attributes.putAll(
+ engineProperties
)
}
@@ -20,11 +20,7 @@ class AsciiDocEngine extends DocEngine {
Map attributes = [
'imagesdir': '../img',
'source-highlighter':'coderay',
- 'icons':'font',
- 'javaee': 'https://docs.oracle.com/javaee/7/api/',
- 'javase': 'https://docs.oracle.com/javase/7/docs/api/',
- 'groovyapi': 'http://docs.groovy-lang.org/latest/html/gapi/',
- 'springapi': 'https://docs.spring.io/spring/docs/current/javadoc-api/'
+ 'icons':'font'
]
@Override
String render(String content, RenderContext context) {
@@ -31,7 +31,7 @@ class PublishGuide extends DefaultTask {
@Input String language = ""
@Input boolean asciidoc = false
@Input @Optional String sourceRepo
-
+ @Input @Optional Properties properties = new Properties()
Collection macros = []
File workDir = project.buildDir as File
@@ -49,6 +49,8 @@ class PublishGuide extends DefaultTask {
}
}
+ props.putAll(properties)
+
def publisher = new DocPublisher(sourceDir, targetDir)
publisher.ant = project.ant
publisher.asciidoc = asciidoc

0 comments on commit 75fe158

Please sign in to comment.