Skip to content
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.

⛔️ DEPRECATED: Generic template backend for Asciidoctor.js

License

Notifications You must be signed in to change notification settings

asciidoctor/asciidoctor-template.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generic template backend for Asciidoctor.js

Travis build status npm version

Usage

The asciidoctor-template.js is a template backend for Asciidoctor.js based on Jade template engine.

Here’s the list of currently supported backends:

Reveal.js

In this example we are using the Reveal.js backend:

npm install asciidoctor.js
npm install asciidoctor-reveal.js
var asciidoctor = require('asciidoctor.js')();
var Asciidoctor = asciidoctor.Asciidoctor();
var Opal = asciidoctor.Opal;
Opal.load('nodejs');
Opal.load('pathname');
require('asciidoctor-template.js');

var options = Opal.hash({'safe': 'safe',
                         'template_dir': 'node_modules/asciidoctor-reveal.js/templates',
                         '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);

About

⛔️ DEPRECATED: Generic template backend for Asciidoctor.js

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published