💄 Adjust metadata output

pull/91/head
Carlos Beleña 2022-01-23 20:28:50 +01:00
parent 850fc65b1b
commit c9bb4b0b63
No known key found for this signature in database
GPG Key ID: A6EE66C946E343D1
3 changed files with 10 additions and 10 deletions

View File

@ -13,7 +13,11 @@
{{/* Gather partials for this context */}} {{/* Gather partials for this context */}}
{{ if .Params.showDate | default (.Site.Params.article.showDate | default true) }} {{ if .Params.showDate | default (.Site.Params.article.showDate | default true) }}
{{ $meta.Add "partials" (slice (partial "meta/date.html" .)) }} {{ $meta.Add "partials" (slice (partial "meta/date.html" .Date)) }}
{{ end }}
{{ if .Params.showDateUpdated | default (.Site.Params.article.showDateUpdated | default false) }}
{{ $meta.Add "partials" (slice (partial "meta/date-updated.html" .Lastmod)) }}
{{ end }} {{ end }}
{{ if and (.Params.showWordCount | default (.Site.Params.article.showWordCount | default false)) (ne .WordCount 0) }} {{ if and (.Params.showWordCount | default (.Site.Params.article.showWordCount | default false)) (ne .WordCount 0) }}

View File

@ -0,0 +1,3 @@
{{- i18n "article.updated" -}}: 
{{ partial "meta/date.html" . }}
{{- /* Trim EOF */ -}}

View File

@ -1,11 +1,4 @@
<time datetime="{{ .Date }}"> <time datetime="{{ . }}">
{{- .Date.Format (.Site.Params.article.dateFormat | default "2 January 2006") -}} {{- . | time.Format (site.Params.article.dateFormat | default "2 January 2006") -}}
</time> </time>
{{ if .Params.showDateUpdated | default (.Site.Params.article.showDateUpdated | default false) }}
&nbsp;(Updated:&nbsp;
<time datetime="{{ .Lastmod }}">
{{- .Lastmod.Format (.Site.Params.article.dateFormat | default "2 January 2006") -}}
</time>
)
{{ end }}
{{- /* Trim EOF */ -}} {{- /* Trim EOF */ -}}