Override date and author displays, support custom author per post.
This commit is contained in:
parent
30dd87ef88
commit
78859c7ccc
9
layouts/partials/post_meta/author.html
Normal file
9
layouts/partials/post_meta/author.html
Normal 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>
|
13
layouts/partials/post_meta/date.html
Normal file
13
layouts/partials/post_meta/date.html
Normal 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 }}
|
Loading…
Reference in New Issue
Block a user