Browse Source

include author and Posted prefix for single.html

Alexander Avery 3 weeks ago
parent
commit
8978136c39
  1. 8
      layouts/_default/single.html

8
layouts/_default/single.html

@ -3,7 +3,13 @@
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
{{ $dateHuman := .Date | time.Format "Mon | Jan 2, 2006" }} {{ $dateHuman := .Date | time.Format "Mon | Jan 2, 2006" }}
<time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
{{ with .Params.authors }}
{{ $author := (index . 0) }}
<h4>Author: <a href={{ printf "/%s/%s" "authors" (urlize $author) }}>{{ $author }}</a></h4>
{{ end }}
<h4>Posted: <time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time></h4>
{{ .Content }} {{ .Content }}
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}

Loading…
Cancel
Save