hugo-theme-readable

Fork of https://github.com/cjtheham/hugo-theme-readable
git clone https://git.eamoncaddigan.net/hugo-theme-readable.git
Log | Files | Refs | README | LICENSE

metadata.html (776B)


      1 {{ $dateTime := .PublishDate.Format "2006-01-02" }}
      2 {{ $lastmodTime := .Lastmod.Format "2006-01-02" }}
      3 {{ $dateFormat := .Site.Params.dateFormat | default "Jan 2, 2006" }}
      4 <i data-feather="calendar"></i>
      5 {{ if .PublishDate }}
      6 {{ if and (ne $lastmodTime $dateTime) (gt .Lastmod .Date) }}
      7   <time datetime="{{ $lastmodTime }}">{{ .Lastmod.Format $dateFormat }}</time>
      8   (first posted <time datetime="{{ $dateTime }}">{{ .PublishDate.Format $dateFormat }}</time>)
      9 {{ else }}
     10   <time datetime="{{ $dateTime }}">{{ .PublishDate.Format $dateFormat }}</time>
     11 {{ end }}
     12 {{ end }}
     13 {{ with .Params.tags }}
     14 <i data-feather="tag"></i>
     15 {{ range . }}
     16 {{ $href := print "/tags/" (urlize .) }}
     17 <a class="btn btn-sm btn-outline-dark tag-btn" href="{{ $href }}">{{ . }}</a>
     18 {{ end }}
     19 {{ end }}