diff --git a/hakyll.cabal b/hakyll.cabal
--- a/hakyll.cabal
+++ b/hakyll.cabal
@@ -1,5 +1,5 @@
 Name:    hakyll
-Version: 4.3.2.0
+Version: 4.3.3.0
 
 Synopsis: A static website compiler library
 Description:
diff --git a/src/Hakyll/Web/Template/Context.hs b/src/Hakyll/Web/Template/Context.hs
--- a/src/Hakyll/Web/Template/Context.hs
+++ b/src/Hakyll/Web/Template/Context.hs
@@ -6,6 +6,7 @@
     , field
     , constField
     , listField
+    , functionField
     , mapContext
 
     , defaultContext
@@ -84,6 +85,15 @@
 --------------------------------------------------------------------------------
 listField :: String -> Context a -> Compiler [Item a] -> Context b
 listField key c xs = field' key $ \_ -> fmap (ListField c) xs
+
+
+--------------------------------------------------------------------------------
+functionField :: String -> ([String] -> Item a -> Compiler String) -> Context a
+functionField name value = Context $ \k i -> case words k of
+    []              -> empty
+    (n : args)
+        | n == name -> StringField <$> value args i
+        | otherwise -> empty
 
 
 --------------------------------------------------------------------------------
diff --git a/src/Hakyll/Web/Template/Read.hs b/src/Hakyll/Web/Template/Read.hs
--- a/src/Hakyll/Web/Template/Read.hs
+++ b/src/Hakyll/Web/Template/Read.hs
@@ -21,7 +21,7 @@
 readTemplate :: String -> Template
 readTemplate input = case parse template "" input of
     Left err -> error $ "Cannot parse template: " ++ show err
-    Right t -> t
+    Right t  -> t
 
 
 --------------------------------------------------------------------------------
diff --git a/tests/Hakyll/Web/Template/Tests.hs b/tests/Hakyll/Web/Template/Tests.hs
--- a/tests/Hakyll/Web/Template/Tests.hs
+++ b/tests/Hakyll/Web/Template/Tests.hs
@@ -58,6 +58,7 @@
         n1 <- makeItem "Jan"
         n2 <- makeItem "Piet"
         return [n1, n2]
+    , functionField "rev" $ \args _ -> return $ unwords $ map reverse args
     ]
   where
 
diff --git a/tests/data/template.html b/tests/data/template.html
--- a/tests/data/template.html
+++ b/tests/data/template.html
@@ -1,6 +1,8 @@
 <div>
     I'm so rich I have $$3.
 
+    $rev foo$
+
     $if(body)$
     I have body
     $else$
diff --git a/tests/data/template.html.out b/tests/data/template.html.out
--- a/tests/data/template.html.out
+++ b/tests/data/template.html.out
@@ -1,6 +1,8 @@
 <div>
     I'm so rich I have $3.
 
+    oof
+
     
     I have body
     
