aboutsummaryrefslogtreecommitdiff
path: root/Types.hs
diff options
context:
space:
mode:
authorMiroslav Kratochvil <miroslav.kratochvil@uni.lu>2023-06-22 11:43:39 +0200
committerMiroslav Kratochvil <miroslav.kratochvil@uni.lu>2023-06-22 11:43:39 +0200
commit2ea84315db882c3341ae25f0fe2591a2de109d49 (patch)
treef1acf23252898ff53fede0d38d71a4f653763e33 /Types.hs
parent73d1920b6296bf73fbef87c9e8460cd5d2c2071e (diff)
parenta2dd9384b4e0eb67346848bdb90a35b039640669 (diff)
downloadreploy-2ea84315db882c3341ae25f0fe2591a2de109d49.tar.gz
reploy-2ea84315db882c3341ae25f0fe2591a2de109d49.tar.bz2
Merge branch 'mk-modification-timestamps' into 'master'
add a script for sourcing the timestamps from gits Closes #2 See merge request R3-core/websites-dev/reploy!3
Diffstat (limited to 'Types.hs')
-rw-r--r--Types.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Types.hs b/Types.hs
index 58a8197..7f09b05 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,11 @@ 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" <>