nerdcel / kirby3-favicon
Kirby3 plugin to create favicons from the panel.
Installs: 1 657
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:kirby-plugin
Requires
- php: >= 8.1 < 8.4
- getkirby/composer-installer: ^1.2.1
Requires (Dev)
- phpstan/phpstan: ^1.10
- roave/security-advisories: dev-latest
README
This plugin provides helpers to render modern and legacy favicon file for your website.
Installation
Download
Download and copy this repository to /site/plugins/kirby3-favicon
.
Git submodule
git submodule add https://github.com/nerdcel/kirby3-favicon.git site/plugins/kirby3-favicon
Composer
composer require nerdcel/kirby3-favicon
Setup
Simply add the following fields to your site blueprint and upload the images.
fields: faviconsvg: type: files label: Favicon SVG uploads: parent: site template: svg max: 1 faviconimage: type: files label: Favicon Legacy uploads: parent: site template: favicon max: 1
What's happening
The Plugin provides a route for the favicon.ico and converts the uploaded legacy image to an .ico image. For modern purpose, an SVG and multiple versions of a PNG file are rendered. Additionally, a manifest.webmanifest route is added to map the right images.
Helpers for the Template
To output the favicons, add the 'favicons' snippet to the header of your site and see if the result matches your needs.
License
MIT