An example project that demonstrates how to use docToolchain with the Asciidoctor Gradle plugin. Converts AsciiDoc to HTML5 using the Asciidoctor Gradle plugin and uploads the content to Confluence using docToolchain.
The AsciiDoc and AsciiDoctor content is based on the asciiDoctor-to-html-example project.
docToolchain documentation and sources can be found on GitHub.
Convert the AsciiDoc to HTML5 by invoking the 'asciidoctor' goal:
$ ./gradlew asciidoctor
Open the file build/asciidoc/html/example-manual.html in your browser to see the generated HTML file.
Publish the generated HTML5 content to Confluence using docToolchain.
-
docToolchain v1.1.0 is available on the system path.
-
Update Confluence configuration in PublishToConfluenceConfig.groovy, set:
-
confluence.api
-
confluence.spaceKey
-
ancestorId
of theconfluence.input
map, can be found by:-
Confluence API:
https://[server]/[context]/rest/api/search3/1.0/search?queryString=MyParentPage
-
Confluence UI: by editing the parent page, the page id is part of the edit URL
-
-
-
Provided Confluence API credentials by either setting:
-
confluence.credentials
in PublishToConfluenceConfig.groovy or -
environment variables
CONFLUENCE_CREDENTIALS_USR
andCONFLUENCE_CREDENTIALS_PSW
or by -
Jenkins credentials with ID
credentials-confluence-api-publish
-
$ doctoolchain . publishToConfluence -PmainConfigFile=PublishToConfluenceConfig.groovy --no-daemon
See known caveats for this setup.