Loading src/Config.hs +3 −1 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ import Path -- | A nebelhorn config. data Config = Config { configBaseUrl :: String, configFolderOutput :: Path Rel Dir, configFolderArticle :: Path Rel Dir, configFolderPage :: Path Rel Dir, Loading @@ -25,7 +26,8 @@ data NavItem = NavItem { instance FromJSON Config where parseJSON = withObject "Config" $ \v -> Config <$> v .:? "folderOutput" .!= [reldir|out|] <$> v .: "baseUrl" .!= "https://example.com" <*> v .:? "folderOutput" .!= [reldir|out|] <*> v .:? "folderArticle" .!= [reldir|article|] <*> v .:? "folderPage" .!= [reldir|page|] <*> v .:? "templateArticle" .!= [relfile|template/article.html|] Loading src/Definition.hs +2 −0 Original line number Diff line number Diff line Loading @@ -5,8 +5,10 @@ import Path import Config import Text.Pandoc.Definition -- TODO: Refactor used used types to be more consistent -- | The Nebelhorn type. data Nebelhorn = Nebelhorn { nebelhornBaseUrl :: String, nebelhornFolderOutput :: Path Rel Dir, -- ^ The folder path to put the output into. nebelhornFoldersToCopy :: [Path Rel Dir], -- ^ The list of folders to just copy over. nebelhornNavItems :: [NavItem], -- ^ The list of navitems for the navbars. Loading src/Load.hs +2 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,8 @@ import Util -- | Reads in a Nebelhorn value using a config. load :: (PandocMonad m, MonadIO m) => Config -> m Nebelhorn load Config{..} = Nebelhorn <$> return configFolderOutput <$> return configBaseUrl <*> return configFolderOutput <*> return configFoldersToCopy <*> return configNavbar <*> uncurry linkIntoMeta <$$> prependPath configFolderArticle Loading Loading
src/Config.hs +3 −1 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ import Path -- | A nebelhorn config. data Config = Config { configBaseUrl :: String, configFolderOutput :: Path Rel Dir, configFolderArticle :: Path Rel Dir, configFolderPage :: Path Rel Dir, Loading @@ -25,7 +26,8 @@ data NavItem = NavItem { instance FromJSON Config where parseJSON = withObject "Config" $ \v -> Config <$> v .:? "folderOutput" .!= [reldir|out|] <$> v .: "baseUrl" .!= "https://example.com" <*> v .:? "folderOutput" .!= [reldir|out|] <*> v .:? "folderArticle" .!= [reldir|article|] <*> v .:? "folderPage" .!= [reldir|page|] <*> v .:? "templateArticle" .!= [relfile|template/article.html|] Loading
src/Definition.hs +2 −0 Original line number Diff line number Diff line Loading @@ -5,8 +5,10 @@ import Path import Config import Text.Pandoc.Definition -- TODO: Refactor used used types to be more consistent -- | The Nebelhorn type. data Nebelhorn = Nebelhorn { nebelhornBaseUrl :: String, nebelhornFolderOutput :: Path Rel Dir, -- ^ The folder path to put the output into. nebelhornFoldersToCopy :: [Path Rel Dir], -- ^ The list of folders to just copy over. nebelhornNavItems :: [NavItem], -- ^ The list of navitems for the navbars. Loading
src/Load.hs +2 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,8 @@ import Util -- | Reads in a Nebelhorn value using a config. load :: (PandocMonad m, MonadIO m) => Config -> m Nebelhorn load Config{..} = Nebelhorn <$> return configFolderOutput <$> return configBaseUrl <*> return configFolderOutput <*> return configFoldersToCopy <*> return configNavbar <*> uncurry linkIntoMeta <$$> prependPath configFolderArticle Loading