diff --git a/hakyll-ogmarkup.cabal b/hakyll-ogmarkup.cabal
--- a/hakyll-ogmarkup.cabal
+++ b/hakyll-ogmarkup.cabal
@@ -1,5 +1,5 @@
 name:                hakyll-ogmarkup
-version:             3.0
+version:             4.0
 synopsis:            Integrate ogmarkup document with Hakyll
 description:         Please see README.md
 homepage:            https://github.com/ogma-project/hakyll-ogmarkup#readme
@@ -17,10 +17,10 @@
   hs-source-dirs:      src
   exposed-modules:     Hakyll.Ogmarkup
   build-depends:       base >= 4.7 && < 5
-                     , hakyll == 4.9.*
-                     , ogmarkup >= 3 && < 4
+                     , hakyll >= 4.9 && < 4.11
+                     , ogmarkup >= 4 && < 5
   default-language:    Haskell2010
 
 source-repository head
-  type:     git
-  location: https://github.com/ogma-project/hakyll-ogmarkup
+  type:     pijul
+  location: https://nest.pijul.com/lthms/hakyll-ogmarkup
diff --git a/src/Hakyll/Ogmarkup.hs b/src/Hakyll/Ogmarkup.hs
--- a/src/Hakyll/Ogmarkup.hs
+++ b/src/Hakyll/Ogmarkup.hs
@@ -1,18 +1,29 @@
-{-# LANGUAGE TypeSynonymInstances #-}
-{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE AllowAmbiguousTypes   #-}
+{-# LANGUAGE FlexibleInstances     #-}
 {-# LANGUAGE MultiParamTypeClasses #-}
+{-# LANGUAGE RankNTypes            #-}
+{-# LANGUAGE ScopedTypeVariables   #-}
+{-# LANGUAGE TypeApplications      #-}
+{-# LANGUAGE TypeSynonymInstances  #-}
 
 module Hakyll.Ogmarkup
   ( ogmarkupCompile
+  , ogmarkupCompile'
   ) where
 
-import Text.Ogmarkup
-import Hakyll
+import           Data.Proxy    (Proxy)
+import           Hakyll
+import           Text.Ogmarkup
 
 -- | A Hakyll compiler used to build an output data which is determined by
 -- the ogmarkup configuration passed as argument.
-ogmarkupCompile :: (GenConf c o)
-                => c
-                -> Compiler (Item o)
-ogmarkupCompile conf = do getResourceBody >>= withItemBody (return . ogmarkup' conf)
-    where ogmarkup' = flip $ ogmarkup
+ogmarkupCompile :: forall c o.
+                   (GenConf c o)
+                => Compiler (Item o)
+ogmarkupCompile = getResourceBody >>= withItemBody (return . ogmarkup @c)
+
+ogmarkupCompile' :: forall c o.
+                    (GenConf c o)
+                 => Proxy c
+                 -> Compiler (Item o)
+ogmarkupCompile' _ = ogmarkupCompile @c
