Permalink
Browse files

Minor code reformatting in Network.Gitit.Initialize.

  • Loading branch information...
1 parent 804c1e7 commit 5fc077bd6d990712a21ede44f0009708fffbf6a8 John MacFarlane committed Oct 24, 2009
Showing with 8 additions and 8 deletions.
  1. +8 −8 Network/Gitit/Initialize.hs
@@ -72,15 +72,15 @@ recompilePageTemplate = do
compilePageTemplate :: FilePath -> IO (T.StringTemplate String)
compilePageTemplate tempsDir = do
defaultGroup <- getDataFileName ("data" </> "templates") >>= T.directoryGroup
- combinedGroup <- do
- customExists <- doesDirectoryExist tempsDir
+ customExists <- doesDirectoryExist tempsDir
+ combinedGroup <-
if customExists
- then do customGroup <- T.directoryGroup tempsDir
- return $ T.mergeSTGroups customGroup defaultGroup
- else do Prelude.putStrLn "custom template dir not found, there's nothing to recompile. we'll just use default templates"
- return defaultGroup
- -- default templates from data directory will be "shadowed"
- -- by templates from the user's template dir
+ -- default templates from data directory will be "shadowed"
+ -- by templates from the user's template dir
+ then do customGroup <- T.directoryGroup tempsDir
+ return $ T.mergeSTGroups customGroup defaultGroup
+ else do logM "gitit" WARNING $ "Custom template directory not found"
+ return defaultGroup
case T.getStringTemplate "page" combinedGroup of
Just t -> return t
Nothing -> error "Could not get string template"

0 comments on commit 5fc077b

Please sign in to comment.