Skip to content

Latest commit

 

History

History
32 lines (17 loc) · 1.54 KB

File metadata and controls

32 lines (17 loc) · 1.54 KB

LiveReload HTML Example

An example project that demonstrates how to convert AsciiDoc to HTML5 using the Asciidoctor Gradle plugin with Live Reload support.

Usage

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.

Live Reload Support

The Gradle build also can support Live Reload

Start by running the build with Gradle 2.5+ continuous build feature.

$ ./gradlew -t asciidoctor

This ensures if you modify example-manual.adoc then everything is rebuilt.

Open another terminal and run the liveReload task:

$ ./gradlew liveReload

Now you can use the Chrome or Firefox plugins to automatically reload your browser when the build completes.

Important
After installing the Chrome LiveReload extension, you need to check the "Allow access to file URLs" checkbox in Tools > Extensions > LiveReload in order for it to work with local files.

Now try editing example-manual.adoc and watching your browser. After a brief wait you will observe that the browser is automatically updated with your changes.