|
@@ -1,10 +1,15 @@
|
|
|
{{ $is_list := .is_list }}
|
|
|
{{ $ := .content }}
|
|
|
+
|
|
|
+<meta content="{{ $.Params.Date }}" itemprop="datePublished">
|
|
|
+<meta content="{{ $.Params.LastMod }}" itemprop="dateModified">
|
|
|
+
|
|
|
<div class="article-metadata">
|
|
|
|
|
|
{{/* If `authors` is set and is not empty. */}}
|
|
|
{{ if $.Params.authors }}
|
|
|
{{ $authorLen := len $.Params.authors }}
|
|
|
+ {{ if gt $authorLen 0 }}
|
|
|
<div>
|
|
|
{{ range $k, $v := $.Params.authors -}}
|
|
|
<span itemscope itemprop="author" itemtype="http://schema.org/Person">
|
|
@@ -17,24 +22,22 @@
|
|
|
{{- if lt $k (sub $authorLen 1) -}}, {{ end }}
|
|
|
{{ end }}
|
|
|
</div>
|
|
|
- {{ else }}
|
|
|
- <span itemscope itemprop="author" itemtype="http://schema.org/Person">
|
|
|
- <meta itemprop="name" content="{{ $.Site.Params.name }}">
|
|
|
- </span>
|
|
|
+ {{ end }}
|
|
|
{{ end }}
|
|
|
|
|
|
+ {{ if not (in (slice "talk" "page") $.Type) }}
|
|
|
<span class="article-date">
|
|
|
- {{ if ne $.Params.Lastmod $.Params.Date }}
|
|
|
- {{ i18n "last_updated" }}
|
|
|
+ {{ $date := $.Lastmod.Format $.Site.Params.date_format }}
|
|
|
+ {{ if eq $.Type "publication" }}
|
|
|
+ {{ $date = $.Date.Format ($.Site.Params.publications.date_format | default "January, 2006") }}
|
|
|
+ {{ else }}
|
|
|
+ {{ if ne $.Params.Lastmod $.Params.Date }}
|
|
|
+ {{ i18n "last_updated" }}
|
|
|
+ {{ end }}
|
|
|
{{ end }}
|
|
|
- <meta content="{{ $.Params.Date }}" itemprop="datePublished">
|
|
|
- <time datetime="{{ $.Params.LastMod }}" itemprop="dateModified">
|
|
|
- {{ $.Lastmod.Format $.Site.Params.date_format }}
|
|
|
- </time>
|
|
|
- </span>
|
|
|
- <span itemscope itemprop="publisher" itemtype="http://schema.org/Person">
|
|
|
- <meta itemprop="name" content="{{ $.Site.Params.name }}">
|
|
|
+ <time>{{ $date }}</time>
|
|
|
</span>
|
|
|
+ {{ end }}
|
|
|
|
|
|
{{ if and (eq $.Type "post") (not (or (eq $.Site.Params.reading_time false) (eq $.Params.reading_time false))) }}
|
|
|
<span class="middot-divider"></span>
|