Permalink
Browse files

Moved settings.yaml from config to .

  • Loading branch information...
1 parent 140e528 commit d3d4e309545e264cb3b5b8e41c1d2b19f6c93314 John MacFarlane committed Mar 16, 2013
Showing with 5 additions and 2 deletions.
  1. +1 −1 gitit2.cabal
  2. 0 {config → }/settings.yaml
  3. +4 −1 src/gitit2.hs
View
@@ -15,7 +15,6 @@ build-type: Simple
homepage: http://gitit.net
data-files: README.markdown
messages/en.msg
- config/settings.yaml
static/favicon.ico
static/robots.txt
static/js/jquery-1.7.2.min.js
@@ -30,6 +29,7 @@ data-files: README.markdown
static/css/hk-pyg.css
static/css/print.css
static/css/screen.css
+ settings.yaml
data/FrontPage.page
data/Help.page
data/markup.Markdown
File renamed without changes.
View
@@ -174,7 +174,10 @@ samplePlugin = Plugin $ \wp -> do
main :: IO ()
main = do
- res <- decodeEither `fmap` B.readFile "config/settings.yaml"
+ settings <- getDataFileName "settings.yaml"
+ -- TODO allow command line specification of settings file
+ -- let the data file provide defaults
+ res <- decodeEither `fmap` B.readFile settings
conf <- case res of
Left e -> err 3 $ "Error reading configuration file.\n" ++ e
Right x -> parseMonad parseConfig x

0 comments on commit d3d4e30

Please sign in to comment.