Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Include format metadata in default installed pages.

This allows them to continue working when the user changes the
default page format.

Closes #329.
  • Loading branch information...
commit 0ea3d6e7dce36b0507f3c38b05b3539c223ed249 1 parent e6ca07c
@jgm authored
Showing with 8 additions and 3 deletions.
  1. +8 −3 Network/Gitit/Initialize.hs
View
11 Network/Gitit/Initialize.hs
@@ -142,11 +142,16 @@ createDefaultPages conf = do
let helpcontents = helpcontentsInitial ++ "\n\n" ++ helpcontentsMarkup
usersguidepath <- getDataFileName "README.markdown"
usersguidecontents <- liftM converter $ readFileUTF8 usersguidepath
+ -- include header in case user changes default format:
+ let header = "---\nformat: markdown\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" welcomecontents
- createIfMissing fs "Help.page" auth "Default help page" helpcontents
- createIfMissing fs "Gitit User's Guide.page" auth "User's guide (README)" usersguidecontents
+ createIfMissing fs (frontPage conf <.> "page") auth "Default front page"
+ $ header ++ welcomecontents
+ createIfMissing fs "Help.page" auth "Default help page"
+ $ header ++ helpcontents
+ createIfMissing fs "Gitit User's Guide.page" auth "User's guide (README)"
+ $ header ++ usersguidecontents
createIfMissing :: FileStore -> FilePath -> Author -> Description -> String -> IO ()
createIfMissing fs p a comm cont = do
Please sign in to comment.
Something went wrong with that request. Please try again.