The hakyll-favicon package

[ Tags: bsd3, library, program, web ] [ Propose Tags ]

Generate favicons for Hakyll websites

[Skip to Readme]


Versions 0.1.0
Dependencies base (>=4.7 && <5), filepath, hakyll, hakyll-favicon [details]
License BSD3
Copyright 2017 Elie Genard
Author Elie Genard
Category Web
Home page
Source repo head: git clone
Uploaded Sun Apr 23 16:59:43 UTC 2017 by elaye
Distributions NixOS:0.1.0, openSUSE:0.1.0
Executables example
Downloads 242 total (10 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-04-23 [all 1 reports]
Hackage Matrix CI




Maintainer's Corner

For package maintainers and hackage trustees

Readme for hakyll-favicon-0.1.0

[back to package description]

hakyll-favicon Build Status

This library allows you to easily add favicons to your hakyll website. You provide one SVG image and the library will convert it to different resolutions and generate the corresponding html.


This library depends on ImageMagick to convert the images.


First, add a faviconsRules that points to your main favicon in your Site.hs file like this:

main = hakyll $ do
  faviconsRules "images/favicon.svg" -- path to your favicon

Second, add a favicons field in your template head:


Finally add the favicons context to your template context:

main = hakyll $ do
  match "index.html" $ do
    let ctx = ... `mappend`
              ... `mappend`
              faviconsField `mappend` -- add this

The example directory provides a minimal working example of this.


First, build the example:

stack build

Then build the example page:

stack exec example build

Or you can start a local server to serve the generated page:

stack exec example watch

Generated favicons

The following favicons are generated:

target | format | sizes | description -------------|--------|--------|------------ all | .ico | 32, 64 | basic favicon all | .png | 32 | basic favicon iOS | .png | 144 | third-generation iPad with high-resolution Retina display iOS | .png | 114 | iPhone with high-resolution Retina display iOS | .png | 72 | first- and second-generation iPad iOS, Android | .png | 57 | non-Retina iPhone, iPod Touch, and Android 2.1+ devices