From 1f477797f5ec78cc7012ee4b5442968a311bd012 Mon Sep 17 00:00:00 2001 From: nek0 Date: Tue, 24 Sep 2019 04:38:11 +0200 Subject: [PATCH] add microdata --- src/Main.hs | 3 +-- templates/default.html | 11 ++++++++--- templates/post.html | 32 ++++++++++++++++++-------------- 3 files changed, 27 insertions(+), 19 deletions(-) diff --git a/src/Main.hs b/src/Main.hs index 9b51b63..34f0b84 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -91,8 +91,7 @@ main = let ctx = (postCtx tags) <> pageCtx <> flattrCtx full <- loadAndApplyTemplate "templates/post.html" ctx compiled _ <- saveSnapshot "content" compiled - loadAndApplyTemplate "templates/default.html" baseCtx full - >>= relativizeUrls + loadAndApplyTemplate "templates/default.html" (baseCtx <> ctx) full -- Post tags tagsRules tags $ \tag pattern -> do diff --git a/templates/default.html b/templates/default.html index 05be201..c145dcc 100644 --- a/templates/default.html +++ b/templates/default.html @@ -25,7 +25,7 @@ - +
Nek0's Blog @@ -86,8 +86,13 @@
-
-

$title$

+ $if(datetime)$ +
+

$title$

+ $else$ +
+

$title$

+ $endif$ $body$
diff --git a/templates/post.html b/templates/post.html index a641d94..22a3310 100644 --- a/templates/post.html +++ b/templates/post.html @@ -1,24 +1,28 @@
- Posted on - $if(author)$ - by $author$ - $endif$ - $if(tags)$ - in $tags$ - $endif$ + Posted on + $if(author)$ + by + $author$ + + $endif$ + $if(tags)$ + in $tags$ + $endif$
-$body$ +
+ $body$ +
Donate using Liberapay