1 {-# LANGUAGE TemplateHaskell #-}
2 -- | Common handler functions.
3 module Handler.Common where
5 import Data.FileEmbed (embedFile)
8 -- These handlers embed files in the executable at compile time to avoid a
9 -- runtime dependency, and for efficiency.
11 getFaviconR :: Handler TypedContent
12 getFaviconR = return $ TypedContent "image/x-icon"
13 $ toContent $(embedFile "config/favicon.ico")
15 getRobotsR :: Handler TypedContent
16 getRobotsR = return $ TypedContent typePlain
17 $ toContent $(embedFile "config/robots.txt")