Skip to content
Browse files

Specify correct format header for initial pages

  • Loading branch information...
1 parent b5dd568 commit 29750b5567f2b4b53f62f285be34a3c661b69ec6 @bmillwood bmillwood committed Jan 14, 2013
Showing with 4 additions and 2 deletions.
  1. +4 −2 Network/Gitit/Initialize.hs
View
6 Network/Gitit/Initialize.hs
@@ -126,7 +126,7 @@ createDefaultPages conf = do
, writerLiterateHaskell = showLHSBirdTracks conf
}
-- note: we convert this (markdown) to the default page format
- converter = case defaultPageType conf of
+ converter = case pt of
Markdown -> id
LaTeX -> writeLaTeX defOpts . toPandoc
HTML -> writeHtmlString defOpts . toPandoc
@@ -143,7 +143,9 @@ createDefaultPages conf = do
usersguidepath <- getDataFileName "README.markdown"
usersguidecontents <- liftM converter $ readFileUTF8 usersguidepath
-- include header in case user changes default format:
- let header = "---\nformat: markdown\n...\n\n"
+ let header = "---\nformat: " ++
+ show pt ++ (if defaultLHS conf then "+lhs" else "") ++
+ "\n...\n\n"
-- add front page, help page, and user's guide
let auth = Author "Gitit" ""
createIfMissing fs (frontPage conf <.> "page") auth "Default front page"

0 comments on commit 29750b5

Please sign in to comment.
Something went wrong with that request. Please try again.