Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Andres Almiray on Ascii Doctor

Andres Almiray on Ascii Doctor

More Decks by Enterprise Java User Group Austria

Other Decks in Technology

Transcript

  1. Asciidoctor: Because
    writing documentation
    does not have to suck
    Andres Almiray
    @aalmiray
    [email protected]

    View Slide

  2. Java developer since the beginning
    True believer in Open Source
    Groovy committer since 2007
    Project lead of the Griffon framework
    Currently working for
    About the Speaker

    View Slide

  3. About the Speaker

    View Slide

  4. View Slide

  5. About the Speaker

    View Slide

  6. View Slide

  7. = Hello, Gr8conf!
    Doc Writer
    An introduction to http://asciidoc.org[AsciiDoc].
    == First Section
    * item 1
    * item 2
    [source,groovy]
    ----
    println "Hello, World!"
    ----

    View Slide

  8. View Slide

  9. The Asciidoctor Bunch
    @alexsotob!
    @lightguardjp!
    @mojavelinux!
    @carbonfray!

    View Slide

  10. http://asciidoctor.org
    •  Gradle!
    •  Maven!
    •  Plain Java!
    •  Javascript (asciidoctor.js)!
    •  Chrome extension!
    •  Firefox addon!
    •  http://github.com/asciidoctor!

    View Slide

  11. build.gradle
    buildscript {!
    repositories {!
    maven {!
    url 'http://dl.bintray.com/content/aalmiray/asciidoctor’!
    }!
    jcenter()!
    }!
    !
    dependencies {!
    classpath 'org.asciidoctor:asciidoctor-gradle-plugin:0.7.0’!
    }!
    }!
    !
    apply plugin: 'asciidoctor!
    !

    View Slide

  12. Configuration
    asciidoctor {!
    backends = [‘html5’, ‘docbook’] // more to come!!
    options = [!
    toc: ‘left’,!
    ‘toc-title’: ‘Table of Contents’,!
    ‘projectVersion’: project.version!
    ]!
    }!
    !

    View Slide

  13. Asciidoclet
    /**!
    * = Asciidoclet!
    *!
    * Sample comments that include +source code+.!
    *!
    * [source,java]!
    * --!
    * public class Main{!
    * public static void main(String[] args) {!
    * Foo.doAwesomeStuff();!
    * }!
    * }!
    * --!
    *!
    * @author https://github.com/asciidoctor[asciidoctor]!
    */!
    public class Foo {!
    public static void doAwesomeStuff() { … }!
    }!

    View Slide

  14. Want more examples?
    Groovy, Golo and Ceylon languages use Asciidoc
    for their documentation
    The Spring framework manual
    Asciidoctor website itself
    Arquillian, Weld and other JBoss sites
    The animals-on-covers book publisher accepts
    Asciidoc as a format J

    View Slide

  15. STOP!!
    !
    DEMO TIME!

    View Slide

  16. Q & A!

    View Slide

  17. THANK YOU!!
    !
    @aalmiray!
    [email protected]!

    View Slide