Created
October 25, 2016 08:11
-
-
Save anonymous/a171cae0371214510675c266fbd00d37 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Asciidoctor asciidoctor = Asciidoctor.Factory.create() (1) | |
File inputFile = new File("path/to/save/asciidocs/index.adoc") (2) | |
inputFile << new File("path/to/save/asciidocs/overview.adoc").text | |
inputFile << new File("path/to/save/asciidocs/paths.adoc").text | |
inputFile << new File("path/to/save/asciidocs/security.adoc").text | |
inputFile << new File("path/to/save/asciidocs/definitions.adoc").text | |
AttributesBuilder attributesBuilder = AttributesBuilder.attributes() (3) | |
attributesBuilder.tableOfContents(true) | |
attributesBuilder.docType("book") | |
attributesBuilder.sectNumLevels(3) | |
attributesBuilder.sectionNumbers(true) | |
OptionsBuilder options = OptionsBuilder.options() (4) | |
options.backend("pdf") | |
options.attributes(attributesBuilder) | |
asciidoctor.renderFile(inputFile, options) (5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment