File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
layouts/_partials/article-list Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -11,14 +11,18 @@ <h2 class="article-title">
1111 {{- $description = $description | default (T "list.page" (len .Pages)) -}}
1212 {{- end -}}
1313 {{- if or $description (not .Date.IsZero) -}}
14+ {{/*
15+ If it's a term, the date is extracted from the first page of the collection, which is not very useful.
16+ In that case, we prefer to display the description (if set), or the number of pages within the collection.
17+ */}}
1418 < footer class ="article-meta ">
15- {{- if not .Date.IsZero -}}
19+ {{- if or $IsTerm .Date.IsZero -}}
20+ < span class ="article-description "> {{- $description -}}</ span >
21+ {{- else if not .Date.IsZero -}}
1622 < time datetime ="{{ .Date.Format "2006-01-02T15:04:05Z07:00 " }}">
1723 {{- .Date | time.Format .Site.Params.dateFormat.published -}}
1824 </ time >
19- {{- else if $description -}}
20- < span class ="article-description "> {{- $description -}}</ span >
21- {{ end }}
25+ {{- end }}
2226 </ footer >
2327 {{- end -}}
2428 </ div >
You can’t perform that action at this time.
0 commit comments