Override date and author displays, support custom author per post.

This commit is contained in:
Anna Rose 2023-08-31 01:06:45 +00:00
parent 30dd87ef88
commit 78859c7ccc
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,9 @@
<div class="meta__item-author meta__item">
<span class="meta__text">
{{- if .Params.author -}}
by {{ .Params.author }}
{{- else if .Site.Author.name -}}
by {{ .Site.Author.name }}
{{- end -}}
</span>
</div>

View File

@ -0,0 +1,13 @@
{{- if not .Date.IsZero }}
<div class="meta__item-datetime meta__item">
on
<time class="meta__text" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
{{- .Date | dateFormat (.Site.Params.dateformat | default "January 02, 2006") -}}
</time>
{{- if ne .Date .Lastmod }}
<time class="meta__text" datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}">(
{{- T "meta_lastmod" }}: {{ .Lastmod | dateFormat (.Site.Params.dateformat | default "January 02, 2006") -}}
)</time>
{{- end -}}
</div>
{{- end }}