$ npm i @asciidoctor/core @asciidoctor/manpage-converter
var asciidoctor = require('@asciidoctor/core')()
require('@asciidoctor/manpage-converter')()
const options = {
attributes: { backend: 'manpage', doctype: 'book' },
standalone: true
}
const content = `= Manual page
:doctitle: Awesome Asciidoctor
:docdate: 2019-01-01
== First section
Once upon a time...`
const manpage = asciidoctor.convert(content, options)
//console.log(manpage)