0.1.1 • Published 5 years ago

asciidoctor-caniuse v0.1.1

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

:earth_africa: "Can I Use" Extension for Asciidoctor.js

Travis build status

An extension for Asciidoctor.js to render browser support tables for modern web technologies.

Install

$ npm i asciidoctor.js asciidoctor-caniuse

Usage

In your document, use the caniuse macro with the name of the feature:

.battery status
caniuse:battery-status[]

Register the extension before converting your document:

const asciidoctor = require('asciidoctor.js')()
const caniuseExtension = require('asciidoctor-caniuse.js')
const registry = caniuseExtension.register(asciidoctor.Extensions.create())

asciidoctor.convertFile('sample.adoc', { extension_registry: registry })

Rendering

npm.io

NOTE: You can use a docinfo file to add custom stylesheet. See the examples directory.