1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
| {{/*
| ShowDate
|
| Returns false for pages without a date. Otherwise, resolves the requested
| date setting with show_date as its shared fallback.
|
| @param . A page, or a dictionary with page and key (show_single_date or show_summary_date).
| @return boolean True when the date should be displayed.
| */}}
| {{- $page := . -}}
| {{- $key := "show_date" -}}
| {{- if reflect.IsMap . -}}
| {{- $page = .page -}}
| {{- $key = .key -}}
| {{- end -}}
| {{- return and
| (not $page.Date.IsZero)
| (partials.Include "func/IsShown.html" (dict "page" $page "key" $key "fallback" "show_date"))
| -}}
|
|