From 384e56cb53b2f75299a5a95970f800f9fcc76909 Mon Sep 17 00:00:00 2001 From: Mirek Kratochvil Date: Thu, 8 Jun 2023 14:42:11 +0200 Subject: more dir parameters --- Types.hs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'Types.hs') diff --git a/Types.hs b/Types.hs index e818c63..a6a8b2b 100644 --- a/Types.hs +++ b/Types.hs @@ -44,6 +44,8 @@ data SiteState = , _templates :: M.Map FilePath Mu.Template , _outputDir :: FilePath -- ^ Directory for output , _assetDir :: FilePath -- ^ Directory for output + , _sourceDir :: FilePath -- ^ Path to page source data + , _templateDir :: FilePath -- ^ Path to template directory , _defaultTemplate :: FilePath -- ^ Name of the default template , _redirectTemplate :: FilePath -- ^ Name of the template for redirect pages , _tagTemplate :: FilePath -- ^ Name of the template for tag listing pages @@ -71,7 +73,17 @@ siteOptions' = do short 'a' <> help "Assets directory to be copied verbatim" <> value "assets" <> showDefault - --TODO templates directory! + _sourceDir <- + strOption $ + long "source-directory" <> + short 's' <> + help "Path to the directory with source data (possibly multiple paths)" <> + value "cards" <> showDefault + _templateDir <- + strOption $ + long "template-directory" <> + help "Path to the directory with templates" <> + value "templates" <> showDefault _defaultTemplate <- strOption $ long "default-template" <> -- cgit v1.2.3