asciidoctor-caniuse

Asciidoctor extension to request the caniuse API

Usage no npm install needed!

<script type="module">
  import asciidoctorCaniuse from 'https://cdn.skypack.dev/asciidoctor-caniuse';
</script>

README

: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

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