@@ -6,6 +6,7 @@ module Text.Hakyll.ContextManipulations
66 , copyValue
77 , renderDate
88 , changeExtension
9+ , renderBody
910 ) where
1011
1112import Control.Arrow (arr)
@@ -80,3 +81,13 @@ changeExtension :: String -- ^ Extension to change to.
8081changeExtension extension = changeValue "url" changeExtension'
8182 where
8283 changeExtension' = flip addExtension extension . dropExtension
84+
85+-- | Change the body of a file using a certain manipulation.
86+--
87+-- > import Data.Char (toUpper)
88+-- > renderBody (map toUpper)
89+--
90+-- Will put the entire body of the page in UPPERCASE.
91+renderBody :: (String -> String)
92+ -> HakyllAction Context Context
93+renderBody = renderValue "body" "body"