
Product
Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
metalsmith-favicons
Advanced tools
A Metalsmith plugin that will generate all your favicons (using favicons) from a suitable source image.
npm install metalsmith-favicons --save
metalsmith-favicons takes options similar to favicons, with some small additions and changes. Below is a list of properties and their defaults.
{
src: '**/favicon.png', // A pattern defining your source image used to generate favicons.
dest: false, // The destination directory, same as src dir if not set.
appName: null, // Your application's name. `string`
appDescription: null, // Your application's description. `string`
developerName: null, // Your (or your developer's) name. `string`
developerURL: null, // Your (or your developer's) URL. `string`
background: "#fff", // Background colour for flattened icons. `string`
url: "/", // Absolute URL for OpenGraph image. `string`
display: "standalone", // Android display: "browser" or "standalone". `string`
orientation: "portrait", // Android orientation: "portrait" or "landscape". `string`
version: "1.0", // Your application's version number. `number`
logging: false, // Print logs to console? `boolean`
online: false, // Use RealFaviconGenerator to create favicons? `boolean`
icons: {
android: false, // Create Android homescreen icon. `boolean`
appleIcon: false, // Create Apple touch icons. `boolean`
appleStartup: false, // Create Apple startup images. `boolean`
coast: false, // Create Opera Coast icon. `boolean`
favicons: true, // Create regular favicons. `boolean`
firefox: false, // Create Firefox OS icons. `boolean`
opengraph: false, // Create Facebook OpenGraph image. `boolean`
twitter: false, // Create Twitter Summary Card image. `boolean`
windows: false, // Create Windows 8 tile icons. `boolean`
yandex: false // Create Yandex browser icon. `boolean`
}
}
metalsmith.json config example:
{
"plugins": {
"metalsmith-favicons": {
src: '**/logo.png',
dest: 'favicons/',
icons: {
android: true,
appleIcon: true,
favicons: true
}
}
}
}
Build script example:
var metalsmith = require('metalsmith');
var markdown = require('metalsmith-markdown');
var favicons = require('metalsmith-favicons');
metalsmith(__dirname)
.source('src')
.destination('pub')
.use(favicons({
src: '**/logo.png',
dest: 'favicons/',
icons: {
android: true,
appleIcon: true,
favicons: true
}
}))
.use(markdown({
gfm: true,
tables: true
}))
.build(function (err) {
if (err) {
throw err;
}
});
metalsmith-favicons will add a favicons
property to metalsmith.metadata()
with one property html
,
which is an array of the meta
and link
tags for use in your templates. Loop over this html
array to add the needed
tags in your html head so your new favicons show up on your site.
An example in Jade:
html
head
if favicons && favicons.html
each item in favicons.html
!= item
You need Node 4.x or above, see favicons for more info.
FAQs
A Metalsmith favicons generator.
We found that metalsmith-favicons demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.