1.5.7-rc.2 • Published 6 years ago

asciidoctor-docbook.js v1.5.7-rc.2

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

DocBook backend for Asciidoctor.js

ifdef::env-github[] image:http://img.shields.io/travis/Mogztter/asciidoctor-docbook.js.svg[Travis build status, link=https://travis-ci.org/Mogztter/asciidoctor-docbook.js] image:http://img.shields.io/npm/v/asciidoctor-docbook.js.svg[npm version, link=https://www.npmjs.org/package/asciidoctor-docbook.js] endif::[]

Install

$ npm i asciidoctor.js asciidoctor-docbook.js

Usage

var asciidoctor = require('asciidoctor.js')();
require('asciidoctor-docbook.js')();

const options = {
  attributes: {backend: 'docbook45', doctype: 'book'},
  header_footer: true
};
const content = `= DocBook\n\
:doctitle: Awesome Asciidoctor\n\
:docdate: 2016-01-01\n\n\
== First section\n\
Once upon a time...`;

const docbook = asciidoctor.convert(content, options);
//console.log(docbook);