From 24ee5f501c5ecc5e988b9e5a27d6897355cfbd58 Mon Sep 17 00:00:00 2001 From: Marcell Mars Date: Tue, 17 Mar 2020 15:51:29 +0100 Subject: [PATCH] added last_modified for the front matter.. also git info which could make it slower.. --- config/_default/config.toml | 1 + themes/piratecare/assets/css/site.css | 2 +- themes/piratecare/layouts/session/single.html | 8 +++++++- themes/piratecare/layouts/topic/single.html | 6 ++++++ 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/config/_default/config.toml b/config/_default/config.toml index a3e4e96..69d5e68 100644 --- a/config/_default/config.toml +++ b/config/_default/config.toml @@ -4,6 +4,7 @@ title = "Pirate Care" theme = "piratecare" relativeurls = true disableKinds = ["RSS", "sitemap", "taxonomy"] +enableGitInfo = true [params] description = "Network of activists, researchers and practitioners against the criminalisation of solidarity & for a common care infrastructure." diff --git a/themes/piratecare/assets/css/site.css b/themes/piratecare/assets/css/site.css index 4d68eb5..0930714 100644 --- a/themes/piratecare/assets/css/site.css +++ b/themes/piratecare/assets/css/site.css @@ -56,7 +56,7 @@ html { } img { - @apply py-2; + @apply py-2; } /* purgecss ignore */ diff --git a/themes/piratecare/layouts/session/single.html b/themes/piratecare/layouts/session/single.html index 78c4d11..f3a9240 100644 --- a/themes/piratecare/layouts/session/single.html +++ b/themes/piratecare/layouts/session/single.html @@ -34,6 +34,12 @@ {{define "main" }}
-
{{ .Content }}
+ {{ if eq .Params.last_modified "top" }} +
Last modified: {{ dateFormat "Monday, Jan 2, 2006" .Lastmod }}
+ {{ end }} +
{{ .Content }}
+ {{ if eq .Params.last_modified "bottom" }} +
Last modified: {{ dateFormat "Monday, Jan 2, 2006" .Lastmod }}
+ {{ end }}
{{ end }} diff --git a/themes/piratecare/layouts/topic/single.html b/themes/piratecare/layouts/topic/single.html index 4ae3a8a..0c536c5 100644 --- a/themes/piratecare/layouts/topic/single.html +++ b/themes/piratecare/layouts/topic/single.html @@ -44,6 +44,12 @@ {{define "main" }}
+ {{ if eq .Params.last_modified "top" }} +
Last modified: {{ dateFormat "Monday, Jan 2, 2006" .Lastmod }}
+ {{ end }}
{{ .Content }}
+ {{ if eq .Params.last_modified "bottom" }} +
Last modified: {{ dateFormat "Monday, Jan 2, 2006" .Lastmod }}
+ {{ end }}
{{ end }}