aboutsummaryrefslogtreecommitdiff
path: root/Types.hs
diff options
context:
space:
mode:
authorMirek Kratochvil <exa.exa@gmail.com>2023-06-17 20:40:11 +0200
committerMirek Kratochvil <exa.exa@gmail.com>2023-06-17 20:40:40 +0200
commit32a49d3179a969604410ff7507af939c77045b4f (patch)
tree70e8a0e3bacad4b7208797b45e1b0805c8d70678 /Types.hs
parent0f97b7a64fa3733689b713a2210a4f7b64e069d7 (diff)
downloadreploy-32a49d3179a969604410ff7507af939c77045b4f.tar.gz
reploy-32a49d3179a969604410ff7507af939c77045b4f.tar.bz2
export search data, add indexing script
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" <>