diff options
| author | Miguel <m.i@gmx.at> | 2019-03-06 14:26:08 +0100 |
|---|---|---|
| committer | Miguel <m.i@gmx.at> | 2019-03-06 14:26:08 +0100 |
| commit | e8006ff227255a6b1a68a28313333eaacf021d29 (patch) | |
| tree | 9a53cad302334c9ce1fe2f448a27984e3e07c7de | |
| parent | 96a8dfc44685c69c35264cd95af83d2c2c02220f (diff) | |
check directory timestamp too
| -rw-r--r-- | src/WWWStaticusPlugins.hs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/WWWStaticusPlugins.hs b/src/WWWStaticusPlugins.hs index cc190a3..65b4e37 100644 --- a/src/WWWStaticusPlugins.hs +++ b/src/WWWStaticusPlugins.hs @@ -29,13 +29,14 @@ import Text.Regex -- PLUGIN IDEAS -- +-- * scale images +-- * pdf plugin +-- * asciinema, git, videos (generate both from single one) +-- -- * super `gallery and everythin` plugin, just throw images,videos, -- zips,tars,source files,mds etc inside a folder-> gen page! -- * flexible layout, main pic, secondary pics, multiple templates 1 2 3 --- * scale images --- * asciinema, git, videos (generate both from single one) -- * contact form? (use nginx log? save post request??) --- * pdf plugin -- * autotranslate/ multilang -- |little helper to get values out of a map easily @@ -68,10 +69,11 @@ staticusPluginsDefault=[ staticusPluginInit staticusPluginTimestamp::StaticusPlugin staticusPluginTimestamp = StaticusPlugin "init" id runIO where runIO m = - do t1 <- catchIOError (D.getModificationTime $ par "path" m++"/"++"index.md") handler + do t0 <- catchIOError (D.getModificationTime $ par "path" m) handler + t1 <- catchIOError (D.getModificationTime $ par "path" m++"/"++"index.md") handler t2 <- catchIOError (D.getModificationTime $ par "outdir" m++"/"++"index.html") handler - let abort = if(t1<t2) then [("abort","yes")] else [] - when (t1<t2) $ print "result is younger.. aborting!" + let abort = if(max t0 t1<t2) then [("abort","yes")] else [] + when (max t0 t1<t2) $ print "result is younger.. aborting!" return $ M.union (M.fromList abort) m handler e = return $ UTCTime (ModifiedJulianDay 0) 1 |
