# Jekyll Favicon This [Jekyll](https://jekyllrb.com) plugin adds: - a generator for - a `favicon.ico` - multiple `favicon-[width]x[height].png` - a [webmanifest](https://developer.mozilla.org/en-US/docs/Web/Manifest) - a [browser configuration schema](https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/dn320426%28v=vs.85%29) - a tag to generate all the corresponding links and metadata needed in the head tag ## Prerequisites Before using this plugin your system must have installed [ImageMagick](http://www.imagemagick.org) (or [GraphicsMagick](http://www.graphicsmagick.org/)). Check if it is already installed by running: ```sh $ convert --version Version: ImageMagick 7.0.7-27 Q16 x86_64 2018-03-18 http://www.imagemagick.org Copyright: © 1999-2018 ImageMagick Studio LLC License: http://www.imagemagick.org/script/license.php Features: Cipher DPC HDRI Modules Delegates (built-in): bzlib freetype jng jpeg ltdl lzma png tiff xml zlib ``` ## Installation Add this line to your application's Gemfile: ```ruby gem 'jekyll-favicon', '~> 0.2.2', group: :jekyll_plugins ``` ## Usage Note: this plugin does not work with the [github-pages](https://pages.github.com) build, but you can generate the site and push it. ### Generator By installing the plugin, it will be automatically active. It will search for the file `/favicon.svg` and generate set of files in `/assets/images` and few more items at the site's root. It also will exclude the original sources from being copied as a regular static file. You can override whit your sites's `_config.yml`: ```yaml favicon: source: custom-favicon-png-or.svg path: /assets/img ``` This plugin works best if you use an SVG with a square viewbox as the source, but you can also use a PNG instead (at least 558x588). Check [favicon.svg](/test/fixtures/sites/minimal/favicon.svg) as an example. ### Favicon tag To get the links and meta, just add the favicon tag `{{ favicon }}`. For example, on your `index.html` ```html --- ---
{% favicon %}