sidebar: fix date display, include non-regular pages in 'related pages' list
This commit is contained in:
parent
baa84ea713
commit
039399f93c
2 changed files with 6 additions and 4 deletions
|
@ -18,7 +18,9 @@
|
|||
{{- end -}}
|
||||
<a href="{{ $url }}" title="{{ $btitle }}">{{ $page.Title }}{{ $btext }}
|
||||
{{ if $page.Date -}}
|
||||
<small>{{ $page.Date.Format (i18n "dateFormat") }}</small>
|
||||
{{- if not .Params.nodate -}}
|
||||
<small>{{ $page.Date.Format (i18n "dateFormat") }}</small>
|
||||
{{- end -}}
|
||||
{{- else if $page.Params.Teaser -}}<small>{{ $page.Params.Teaser }}</small>
|
||||
{{- else -}}<small>{{ $page.Summary }}</small>
|
||||
{{- end }}
|
||||
|
|
|
@ -64,14 +64,14 @@
|
|||
{{- end }}
|
||||
|
||||
{{- if not .Site.Params.hideParentArticles -}}
|
||||
{{- $related := where .Site.RegularPages "Params.pageid" "in" .Params.parents -}}
|
||||
{{- $related := where .Site.Pages "Params.pageid" "in" .Params.parents -}}
|
||||
{{- partial "card-related"
|
||||
(dict "related" $related "header" (i18n "parent-articles") "id" "parents") -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if and (not .Site.Params.hideChildArticles)
|
||||
(ne .Site.Params.showChildArticles "cards") -}}
|
||||
{{- $related := .Site.RegularPages.RelatedTo (keyVals "parents" .Params.pageid) -}}
|
||||
{{- $related := .Site.Pages.RelatedTo (keyVals "parents" .Params.pageid) -}}
|
||||
{{- partial "card-related"
|
||||
(dict "related" $related "header" (i18n "child-articles") "id" "children") -}}
|
||||
{{- end -}}
|
||||
|
@ -83,7 +83,7 @@
|
|||
{{- end -}}
|
||||
|
||||
{{- if not .Site.Params.hideSiblingArticles -}}
|
||||
{{- $related := .Site.RegularPages.RelatedIndices . "parents" -}}
|
||||
{{- $related := .Site.Pages.RelatedIndices . "parents" -}}
|
||||
{{- partial "card-related"
|
||||
(dict "related" $related "header" (i18n "sibling-articles") "id" "siblings") -}}
|
||||
{{- end -}}
|
||||
|
|
Loading…
Add table
Reference in a new issue