mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-23 21:02:09 +00:00
Support "evergreen" articles
"evergreen" articles don't get outdated and shouldn't be marked with a published date in previews.
This commit is contained in:
parent
e430cedff2
commit
279d70810e
4 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
---
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<meta name="description" content="{{ $description }}">
|
||||
<meta name="author" content="{{ .Site.Author.name }}">
|
||||
<meta property="article:author" content="{{ .Site.Author.name }}">
|
||||
{{ if gt .Date 0 -}}
|
||||
{{ if and (gt .Date 0) (not .Params.evergreen) -}}
|
||||
<meta property="article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
|
||||
{{ end -}}
|
||||
{{ if lt .Date .Lastmod -}}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" }}
|
||||
{{- $logURL := printf "%scontent/%s" .Site.Params.logUrlPrefix .File.Path }}
|
||||
Posted <time itemprop="dateCreated datePublished" class="dt-published published" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time>
|
||||
Posted <time{{ if not (.Params.evergreen) }} itemprop="dateCreated datePublished" class="dt-published published"{{ end }} datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time>
|
||||
by {{- partial "indieweb-author.html" -}} on his <a rel="canonical" itemprop="mainEntityOfPage url" class="u-url url" href="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">Website</a>{{- with .OutputFormats.Get "gemtext" -}}{{- printf " " -}}and <a rel="syndication" class="u-syndication" href="{{replace .Permalink "/gemini" "" 1 | safeURL}}">Gemini capsule</a>{{- end -}}.
|
||||
{{ if lt .Date .Lastmod -}}
|
||||
<br>
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
</h3>
|
||||
{{- end }}
|
||||
Posted <time itemprop="datePublished" class="dt-published published" datetime="{{ .Date.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time>, updated
|
||||
<time itemprop="dateModified" class="dt-updated updated" datetime="{{ .Lastmod.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Lastmod.Format "2006-01-02" }}</time>
|
||||
<time{{ if not (.Params.evergreen) }} itemprop="dateModified" class="dt-updated updated"{{ end }} datetime="{{ .Lastmod.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Lastmod.Format "2006-01-02" }}</time>
|
||||
<p class="p-summary entry-summary" itemprop="description">{{ .Description }}</p>
|
||||
<p>{{- partial "wordcount.html" . -}}</p>
|
||||
</article>
|
||||
|
|
Loading…
Reference in a new issue