0.2.1 • Published 3 years ago

posthtml-iconify v0.2.1

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

posthtml-iconify

NPM

Render icons from Iconify into SVG with PostHTML.

Before:

<span class="iconify" data-icon="mdi:home"></span>

After:

<svg data-icon="mdi:home" ...>...</svg>

Install

Install using NPM or Yarn.

npm install posthtml-iconify
yarn add posthtml-iconify

Usage

Use like a normal PostHTML plugin.

const fs = require('fs');
const posthtml = require('posthtml');
const posthtmlIconify = require('posthtml-iconify');

posthtml()
    .use(posthtmlIconify())
    .process(html/*, options */)
    .then(result => fs.writeFileSync('./after.html', result.html));

Options

No options currently (this may change in the future).

Contributing

See PostHTML Guidelines.