use widgetFile

This commit is contained in:
Joey Hess 2012-07-26 22:54:31 -04:00
parent e40f94cbcd
commit 615dc09ffc
2 changed files with 8 additions and 14 deletions

View file

@ -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