aboutsummaryrefslogtreecommitdiff
path: root/Types.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Types.hs')
-rw-r--r--Types.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Types.hs b/Types.hs
index 12977d8..e6455d5 100644
--- a/Types.hs
+++ b/Types.hs
@@ -44,6 +44,7 @@ data SiteState =
-- the template directory)
, _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
, _sourceDirs :: [FilePath] -- ^ Path to page source data
, _templateDir :: FilePath -- ^ Path to template directory
@@ -68,6 +69,12 @@ siteOptions' = do
long "output" <>
short 'd' <>
help "Directory to render the site to" <> value "_site" <> showDefault
+ _searchDataOut <-
+ Just <$>
+ (strOption $
+ long "search-data-output" <>
+ help "Output JSON with searchable page data to this file") <|>
+ pure Nothing
_assetDir <-
strOption $
long "assets" <>