Skip to content

Commit

Permalink
Merge pull request #339 from benmachine/pagetype
Browse files Browse the repository at this point in the history
Specify correct format header for initial pages
  • Loading branch information
jgm committed Mar 20, 2013
2 parents 9e96f92 + 29750b5 commit 9258f8b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Network/Gitit/Initialize.hs
Expand Up @@ -130,7 +130,7 @@ createDefaultPages conf = do
else writerExtensions def
}
-- 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
Expand All @@ -147,7 +147,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"
Expand Down

0 comments on commit 9258f8b

Please sign in to comment.