aboutsummaryrefslogtreecommitdiff
path: root/Utility/Yesod.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-07-26 22:54:31 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-07-26 22:54:31 -0400
commit615dc09ffc321ce04d3014b3a9f07e7f04b69c80 (patch)
treeec04421e462af79b7ad5e27fc71ecf6a9d3f2695 /Utility/Yesod.hs
parente40f94cbcdcacebb8215ee16b5c575ca865ad810 (diff)
use widgetFile
Diffstat (limited to 'Utility/Yesod.hs')
-rw-r--r--Utility/Yesod.hs17
1 files changed, 6 insertions, 11 deletions
diff --git a/Utility/Yesod.hs b/Utility/Yesod.hs
index a0dd3bdd2..2d2c6c343 100644
--- a/Utility/Yesod.hs
+++ b/Utility/Yesod.hs
@@ -1,4 +1,4 @@
-{- Yesod stuff
+{- Yesod stuff, that's typically found in the scaffolded site.
-
- Copyright 2012 Joey Hess <joey@kitenet.net>
-
@@ -7,16 +7,11 @@
module Utility.Yesod where
-import System.FilePath
+import Yesod.Default.Util
+import Language.Haskell.TH.Syntax
-{- Filename of a template, in the templates/ directory. -}
-template :: FilePath -> FilePath
-template f = "templates" </> f
+widgetFile :: String -> Q Exp
+widgetFile = widgetFileNoReload
-{- A hamlet template file. -}
hamletTemplate :: FilePath -> FilePath
-hamletTemplate f = template f ++ ".hamlet"
-
-{- A julius template file. -}
-juliusTemplate :: FilePath -> FilePath
-juliusTemplate f = template f ++ ".julius"
+hamletTemplate f = globFile "hamlet" f