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

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generic template backend for Asciidoctor.js

Usage

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

npm install asciidoctor.js
npm install asciidoctor-reveal.js
Important
asciidoctor-reveal.js and asciidoctor-template.js are not yet available on npmjs.com
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