post_meta.html 749 B

1234567891011121314151617181920212223
  1. {{- $scratch := newScratch }}
  2. {{- if not .Date.IsZero -}}
  3. {{- $scratch.Add "meta" (slice (printf "<span title='%s'>%s</span>" (.Date) (.Date | time.Format (default "January 2, 2006" site.Params.DateFormat)))) }}
  4. {{- end }}
  5. {{- if (.Param "ShowReadingTime") -}}
  6. {{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime))) }}
  7. {{- end }}
  8. {{- if (.Param "ShowWordCount") -}}
  9. {{- $scratch.Add "meta" (slice (i18n "words" .WordCount | default (printf "%d words" .WordCount))) }}
  10. {{- end }}
  11. {{- if not (.Param "hideAuthor") -}}
  12. {{- with (partial "author.html" .) }}
  13. {{- $scratch.Add "meta" (slice .) }}
  14. {{- end }}
  15. {{- end }}
  16. {{- with ($scratch.Get "meta") }}
  17. {{- delimit . "&nbsp;·&nbsp;" -}}
  18. {{- end -}}