From 5c07a465da98ac277c098ad57b9a4cf158070981 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Tue, 4 Oct 2011 22:44:39 +0000 Subject: [PATCH] web: simplify static path definitions --- hledger-web/Hledger/Web/Settings.hs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/hledger-web/Hledger/Web/Settings.hs b/hledger-web/Hledger/Web/Settings.hs index 8df87289a..17894954f 100644 --- a/hledger-web/Hledger/Web/Settings.hs +++ b/hledger-web/Hledger/Web/Settings.hs @@ -22,7 +22,6 @@ module Hledger.Web.Settings , defbaseurl , hledgerorgurl , manualurl - -- , datadir ) where @@ -106,12 +105,7 @@ loadConfig env = do -- | The location of static files on your system. This is a file system -- path. The default value works properly with your scaffolded site. staticDir :: FilePath ---staticDir = "static" -staticDir = datadir++"static" - -datadir :: FilePath -datadir = "./" --- datadir = "./.hledger/web/" +staticDir = "static" -- | The base URL for your static files. As you can see by the default -- value, this can simply be "static" appended to your application root. @@ -148,7 +142,7 @@ staticRoot conf = [st|#{appRoot conf}/static|] -- | expects a root folder for each type, e.g: hamlet/ lucius/ julius/ globFile :: String -> String -> FilePath -- globFile kind x = kind ++ "/" ++ x ++ "." ++ kind -globFile kind x = datadir ++ "templates/" ++ x ++ "." ++ kind +globFile kind x = "templates/" ++ x ++ "." ++ kind hamletFile :: FilePath -> Q Exp hamletFile = S.hamletFile . globFile "hamlet"