posthtml-iconify
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.