Commit 5d86d723 authored by Nicolas Lenz's avatar Nicolas Lenz

Add article and page folders to config parsing

parent 24395f50
Pipeline #239 passed with stage
in 3 minutes and 55 seconds
......@@ -8,6 +8,8 @@ import Path
data Config = Config {
configOutputFolder :: Path Rel Dir,
configArticleFolder :: Path Rel Dir,
configPageFolder :: Path Rel Dir,
configFoldersToCopy :: [Path Rel Dir],
configNavbar :: [NavItem]
} deriving (Show)
......@@ -20,6 +22,8 @@ data NavItem = NavItem {
instance FromJSON Config where
parseJSON = withObject "Config" $ \v -> Config
<$> v .:? "outputFolder" .!= [reldir|out|]
<*> v .:? "articleFolder" .!= [reldir|article|]
<*> v .:? "pageFolder" .!= [reldir|page|]
<*> v .:? "foldersToCopy" .!= []
<*> v .:? "navbar" .!= [NavItem "Home" "/index.html"]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment