@@ -125,17 +125,31 @@ renderChainWith manipulation templatePaths initial =
125125-- | Mark a certain file as static, so it will just be copied when the site is
126126-- generated.
127127static :: FilePath -> Hakyll ()
128−static source = do destination <- toDestination source
129− depends destination [source] (action destination)
128+static source = runRenderAction static'
130129 where
131− action destination = do makeDirectories destination
132− liftIO $ copyFile source destination
130+ static' = RenderAction
131+ { actionDependencies = [source]
132+ , actionUrl = Just $ return source
133+ , actionFunction = actionFunction'
134+ }
135+
136+ actionFunction' _ = do
137+ destination <- toDestination source
138+ makeDirectories destination
139+ liftIO $ copyFile source destination
133140
134141-- | Render a css file, compressing it.
135142css :: FilePath -> Hakyll ()
136−css source = do destination <- toDestination source
137− depends destination [source] (css' destination)
143+css source = runRenderAction css'
138144 where
139− css' destination = do contents <- liftIO $ readFile source
140− makeDirectories destination
141− liftIO $ writeFile destination (compressCss contents)
145+ css' = RenderAction
146+ { actionDependencies = [source]
147+ , actionUrl = Just $ return source
148+ , actionFunction = actionFunction'
149+ }
150+
151+ actionFunction' _ = do
152+ contents <- liftIO $ readFile source
153+ destination <- toDestination source
154+ makeDirectories destination
155+ liftIO $ writeFile destination (compressCss contents)