Bud.js extension to automatically generate favicons
Install @itinerisltd/bud-favicons to your project.
Yarn:
yarn add @itinerisltd/bud-favicons --dev
npm:
npm install @itinerisltd/bud-favicons --save-dev
At the top of your bud.config.ts
file, import the extension:
import BudFavicons from "@itinerisltd/bud-favicons";
Then, add the extension to your Bud instance:
bud
.use(BudFavicons);
@itinerisltd/bud-favicons works with zero configuration. But there is a robust and developer friendly configuration API should you need to make a modification to the provided defaults. You can see the full list of options in the favicons documentation.
const options = {
logo: bud.path('resources/images/favicon.svg'),
mode: 'webapp',
devMode: 'webapp',
outputPath: bud.path('public'),
favicons: {
icons: {
android: true,
appleIcon: true,
appleStartup: true,
favicons: true,
windows: true,
yandex: false,
},
},
};
You can configure favicons
with the bud.favicons.setup
method:
bud.favicons.setup({
logo: bud.path('resources/images/favicon.svg'),
});
OR
bud.favicons.setup({
logo: bud.path('resources/images/favicon.svg'),
mode: 'webapp',
devMode: 'webapp',
outputPath: bud.path('public'),
favicons: {
background: '#030321',
theme_color: '#ffffff',
icons: {
android: true,
appleIcon: true,
appleStartup: true,
favicons: true,
windows: true,
yandex: false,
},
},
});
Contributions are welcome from everyone.
Bud Favicons is a Itineris Limited project created by Dan Lapteacru.
Full list of contributors can be found here.
Bud Favicons is released under the MIT License.