From e8179a38b944ffbdb45667e272b5e3a74aadfa16 Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Wed, 24 Feb 2021 19:36:09 -0800 Subject: [PATCH] Add Open Graph metas for article posted/mod times --- layouts/partials/head.html | 5 +++++ layouts/posts/single.html | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 4f3191b..695ea72 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -57,5 +57,10 @@ + + + {{ if lt .Date .Lastmod -}} + + {{ end -}} {{ hugo.Generator }} diff --git a/layouts/posts/single.html b/layouts/posts/single.html index a830d2e..15ffae6 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -3,14 +3,13 @@

{{ .Title }}

- {{ $lastmod := .Lastmod -}} - {{ if lt .Date $lastmod -}} + {{ if lt .Date .Lastmod -}} Posted by {{- partial "indieweb-author.html" -}} on his Website {{- with .OutputFormats.Get "gemtext" }} and Gemini capsule {{- end -}}
- Last updated . Changelog + Last updated . Changelog {{ else -}} Posted by {{- partial "indieweb-author.html" -}} on his Website {{- with .OutputFormats.Get "gemtext" }}