From 32a49d3179a969604410ff7507af939c77045b4f Mon Sep 17 00:00:00 2001 From: Mirek Kratochvil Date: Sat, 17 Jun 2023 20:40:11 +0200 Subject: export search data, add indexing script --- Types.hs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Types.hs') 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" <> -- cgit v1.2.3