From c86ece1433da3e8a85d84233f236a7d3b7945534 Mon Sep 17 00:00:00 2001 From: Mirek Kratochvil Date: Thu, 22 Jun 2023 11:43:20 +0200 Subject: implement sourcing of timestamp files --- Types.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Types.hs') diff --git a/Types.hs b/Types.hs index 58a8197..455a4f4 100644 --- a/Types.hs +++ b/Types.hs @@ -58,6 +58,7 @@ data SiteState = , _redirectTemplate :: FilePath -- ^ Name of the template for redirect pages , _tagTemplate :: FilePath -- ^ Name of the template for category pages , _listTemplate :: FilePath -- ^ Name of the template for listing pages + , _timestampSuffix :: FilePath -- ^ File to search for a timestamp (e.g., if the prefix is ".ts", a timestamp for file "page.md" will be looked for in "page.md.ts"). These are best autogenerated with a script that sources the data from git or so. , _urlBase :: FilePath -- ^ "Root route" to prepend to all absolute links. , _dumpFinalState :: Bool -- ^ Triggers printing out the structure when the processing finishes. } @@ -128,6 +129,10 @@ siteOptions' = do strOption $ long "url-base" <> short 'u' <> help "Base absolute URL" <> value "/" <> showDefault + _timestampSuffix <- + strOption $ + long "timestamp-prefix" <> + help "Timestamp file suffix for markdowns" <> value ".timestamp" <> showDefault _dumpFinalState <- switch $ long "dump-state" <> -- cgit v1.2.3