Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #339 from benmachine/pagetype

Specify correct format header for initial pages
  • Loading branch information...
commit 9258f8b4fbe7c974e4b18612894e8c18eefe45c3 2 parents 9e96f92 + 29750b5
@jgm authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 Network/Gitit/Initialize.hs
View
6 Network/Gitit/Initialize.hs
@@ -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
@@ -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"
Please sign in to comment.
Something went wrong with that request. Please try again.