DocuOps with Asciidoc & Gradle plugin

Header

If you love Asciidoc and want to generate cool technical specs in HTML5 and RevealJS slide for technical showcase. This gradle plugin can help:

  • Creating a sane default structure for project docos and templates
  • Generating HTML5 docos (PlantUML supported)
  • Generating RevealJS slide from Asciidoc format

To work with Asciidoc, refer to this writer’s guide, and compare Asciidoc with markdown, also heap of projects are using Asciidoc

Examples

Tech spec Spec

RevealJS slideshow Spec

Build

This plugin is not available in gradle plugin portal. You can build and push to local or private repositories, for example:

./gradlew clean build
./gradlew publishToMavenLocal

Installation

Simply decorate your build.gradle with following:

plugins {
    id 'com.tna.gradle.docgen-plugin' version '1.0.0-SNAPSHOT'
}

docGen {
  //location to store documents for project (presentation, specs...)
  documentRoot 'src' 
  projectInfo {
    projectName = 'CoolApiV1'
    projectVersion = '1.0.0'
    projectAuthors = 'Author A, Author B'
    contactEmail = 'author@mail.com'   
  }
}

Usage

This plugin has three tasks under documentation group:

docGenDirTemplate - generate sensible opinionated document structure with template files (README.adoc, LICENSE, CONTRIBUTING.adoc, CHANGELOG.adoc).

docGenHtml - generate formated html5 from .adoc file under docs/asciidoc/specification. Note this path is created by the previous task.

docGenSlide - generate RevealJS presentation from .adoc file under docs/asciidoc/presentation.

Enjoy Asciidoc! 🐾

Nam Nguyen
Nam Nguyen
Software engineer
comments powered by Disqus