Skip to content

Instantly share code, notes, and snippets.

@mraible
Created April 17, 2015 05:47
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mraible/8b85ed8f06c608e8e0e6 to your computer and use it in GitHub Desktop.
Save mraible/8b85ed8f06c608e8e0e6 to your computer and use it in GitHub Desktop.
Asciidoctor for The JHipster Mini-Book
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.2'
classpath 'org.asciidoctor:asciidoctorj-epub3:1.5.0-alpha.4'
classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.6'
}
}
apply plugin: 'java'
apply plugin: 'org.asciidoctor.convert'
version = '1.0.0-SNAPSHOT'
asciidoctorj {
version = '1.5.2'
}
asciidoctor {
backends 'html5', 'pdf', 'epub3'
attributes 'sourcedir': project.sourceSets.main.java.srcDirs[0],
'endpoint-url': 'http://www.jhipster-book.com/',
'source-highlighter': 'coderay',
'imagesdir': './images',
'toc': 'left',
'icons': 'font',
'setanchors': 'true',
'idprefix': '',
'idseparator': '-',
'docinfo1': 'true'
}
@mojavelinux
Copy link

You don't need the endpoint-url attribute. That was just an example showing how to pass data into the document from Gradle. Also, boolean attributes (such as sectanchors) can have a boolean value instead of a string value.

@mraible
Copy link
Author

mraible commented Oct 27, 2015

Thanks for the tips @mojavelinux!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment