--- title: Hakyll 3 to Hakyll 4 migration guide author: Jasper Van der Jeugt --- Introduction ------------ This tutorial gives a quick overview on how you can port your blog/website from Hakyll 3.X to Hakyll 4. A lot of changes have happened, so it might be useful to read through the [tutorial series](/tutorials.html) before porting your website. Arrow becomes Monad ------------------- In Hakyll 3.X, `Compiler` was an instance of `Arrow`. Since Hakyll 4, `Compiler` is a `Monad`. This means that previous chains such as: ```haskell compile $ someCompiler >>> someOtherCompiler >>> anotherCompiler ``` Now take the general form of: ```haskell compile $ someCompiler >>= someOtherCompiler >>= anotherCompiler ``` Page goes away -------------- The `Page` type in Hakyll 3.X has been removed and replaced by an `Item` type. `pageCompiler` no longer exists -- where you previously used this, you probably want to use `pandocCompiler` instead. `Page`s where manipulated using `setField`/`getField` functions in Hakyll 3.X. In Hakyll 4, all metadata is completely immutable, so these functions have been removed. In order to format and add fields, use a `Context` -- see the next section. Template changes ---------------- The template format has become slightly more flexible, whereas in Hakyll 3.X only keys such as this were allowed: ```html