hugo-theme-next/layouts/partials/post/header_meta/created_date.html

15 lines
648 B
HTML
Raw Normal View History

{{ if .Site.Params.postMeta.created }}
{{ $timeF := .Site.Params.timeFormat }}
{{ $createdTime := (.Date.Format $timeF) | default (.Date.Format $timeF) }}
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="fas fa-solid fa-calendar"></i>
</span>
<span class="post-meta-item-text" title="{{ T "PostMeta.publish.date" }}">
{{ print (T "PostMeta.publish.date") (T "Symbol.colon") }}
</span>
<time title="{{ print (T "PostMeta.publish.time") (T "Symbol.colon") }}{{ .Date }}" itemprop="dateCreated datePublished" datetime="{{ .Date }}">
{{ .Date.Format .Site.Params.dateFormat }}
</time>
</span>
{{ end }}