The asciidoctor-template.js
is a template backend for Asciidoctor.js based on Jade template engine.
Here’s the list of currently supported backends:
In this example we are using the Reveal.js backend:
npm install asciidoctor.js
npm install asciidoctor-reveal.js
var asciidoctor = require('asciidoctor.js')();
require('asciidoctor-template.js');
var options = {safe: 'safe', backend: 'revealjs'};
var content = '= Title\n\n' +
'== Slide 1\n\n' +
'Content 1\n\n' +
'== Slide 2\n\n' +
'Content 2';
var result = asciidoctor.convert(content, options);