PostHTML Favicon generator
npm install posthtml-favicons
This module is using favicons to generate all of favicons based on a single image
Use a simple tag to include your favicon. This plugin will add other related tags and writes generated images to disk.
``html`
See the Options interface in src/index.ts
For favicon configurations see favicon repo:
https://github.com/evilebottnawi/favicons#nodejs
`js
const favIconPlugin = require("posthtml-favicons");
const html =
;posthtml()
.use(favIconPlugin({ outDir: "./dist", configuration: { path: "/icons" } }))
.process(html)
.then((res) => {
// files are written to dist folder
// res.html has new tags
});
``There is an example repo for demonstrating usage with Parcel Bundler