diff options
Diffstat (limited to 'Types.hs')
| -rw-r--r-- | Types.hs | 21 |
1 files changed, 9 insertions, 12 deletions
@@ -22,7 +22,6 @@ module Types where import Control.Monad.Trans.State.Lazy import qualified Data.ByteString.UTF8 -import Data.List.NonEmpty (nonEmpty, toList) import qualified Data.Map as M import qualified Data.Set as S import qualified Data.Yaml as Y @@ -66,7 +65,7 @@ data SiteState = , _templates :: M.Map FilePath Mu.Template , _outputDir :: FilePath -- ^ Directory for output , _searchDataOut :: Maybe FilePath -- ^ File to write the searchable versions of pages to (as JSON) - , _assetDir :: FilePath -- ^ Directory for output + , _assetDirs :: [FilePath] -- ^ Directory for output , _sourceDirs :: [FilePath] -- ^ Path to page source data , _notSourceDirs :: [FilePath] -- ^ Subdirectories of source dirs where pages should not be sourced , _templateDir :: FilePath -- ^ Path to template directory @@ -101,23 +100,21 @@ siteOptions' = do long "search-data-output" <> help "Output JSON with searchable page data to this file") <|> pure Nothing - _assetDir <- - strOption $ + _assetDirs <- + many . strOption $ long "assets" <> short 'a' <> - help "Assets directory to be copied verbatim" <> - value "assets" <> showDefault + help "Assets directory to be copied verbatim (possibly multiple paths)" _sourceDirs <- - fmap (maybe ["pages"] toList . nonEmpty) . many . strOption $ + many . strOption $ long "source-directory" <> short 's' <> - help - "Path to the directory with source data (possibly multiple paths, defaults to a single directory \"pages\")" + help "Path to the directory with source data (possibly multiple paths)" _notSourceDirs <- - fmap (maybe ["assets"] toList . nonEmpty) . many . strOption $ + many . strOption $ long "exclude-source-directory" <> help - "Names of subdirectories of the sources that should never be used for sourcing pages (possibly multiple directory names, defaults to a single directory \"assets\")" + "Names of subdirectories of the sources that should never be used for sourcing pages (possibly multiple directory names)" _templateDir <- strOption $ long "template-directory" <> @@ -126,7 +123,7 @@ siteOptions' = do _defaultTemplate <- strOption $ long "default-template" <> - help "Default template to use for stuff (found in templates directory)" <> + help "Default template to use for stuff (as found in templates directory)" <> value "default.html" <> showDefault _redirectTemplate <- strOption $ |
