From 279d70810e10b879ac9dbd7a77c3350fedbe7c03 Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Mon, 23 May 2022 08:39:24 -0700 Subject: [PATCH] Support "evergreen" articles "evergreen" articles don't get outdated and shouldn't be marked with a published date in previews. --- content/posts/search-engines-with-own-indexes.md | 1 + layouts/partials/head.html | 2 +- layouts/partials/post-meta.html | 2 +- layouts/partials/posts.html | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/content/posts/search-engines-with-own-indexes.md b/content/posts/search-engines-with-own-indexes.md index 50e7425..5d087c9 100644 --- a/content/posts/search-engines-with-own-indexes.md +++ b/content/posts/search-engines-with-own-indexes.md @@ -10,6 +10,7 @@ sitemap: ChangeFreq: weekly Priority: 0.7 footnote_heading: Notes +evergreen: true featured: 1 title: A look at search engines with their own indexes --- diff --git a/layouts/partials/head.html b/layouts/partials/head.html index e2ad491..d90c54e 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -20,7 +20,7 @@ -{{ if gt .Date 0 -}} +{{ if and (gt .Date 0) (not .Params.evergreen) -}} {{ end -}} {{ if lt .Date .Lastmod -}} diff --git a/layouts/partials/post-meta.html b/layouts/partials/post-meta.html index 7730a76..b294df0 100644 --- a/layouts/partials/post-meta.html +++ b/layouts/partials/post-meta.html @@ -1,6 +1,6 @@ {{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" }} {{- $logURL := printf "%scontent/%s" .Site.Params.logUrlPrefix .File.Path }} -Posted +Posted {{ .Date.Format "2006-01-02" }} by {{- partial "indieweb-author.html" -}} on his Website{{- with .OutputFormats.Get "gemtext" -}}{{- printf " " -}}and Gemini capsule{{- end -}}. {{ if lt .Date .Lastmod -}}
diff --git a/layouts/partials/posts.html b/layouts/partials/posts.html index 21dbed3..66e56c2 100644 --- a/layouts/partials/posts.html +++ b/layouts/partials/posts.html @@ -39,7 +39,7 @@ {{- end }} Posted , updated - + {{ .Lastmod.Format "2006-01-02" }}

{{ .Description }}

{{- partial "wordcount.html" . -}}