Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Minor code reformatting in Network.Gitit.Initialize.

  • Loading branch information...
commit 5fc077bd6d990712a21ede44f0009708fffbf6a8 1 parent 804c1e7
John MacFarlane authored
Showing with 8 additions and 8 deletions.
  1. +8 −8 Network/Gitit/Initialize.hs
View
16 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"
Please sign in to comment.
Something went wrong with that request. Please try again.