mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
16 lines
No EOL
509 B
Go Template
16 lines
No EOL
509 B
Go Template
{{- $ret := false }}
|
|
{{- with .page }}
|
|
{{- $ret = partialCached "_relearn/pageIsHidden.gotmpl" . .Path }}
|
|
{{- if not $ret }}
|
|
{{- with .Parent }}
|
|
{{- if eq . $.to }}
|
|
{{- /* stop if we reach the top */}}
|
|
{{- else if partialCached "_relearn/pageIsHidden.gotmpl" . .Path }}
|
|
{{- $ret = true }}
|
|
{{- else }}
|
|
{{- $ret = partialCached "_relearn/pageIsHiddenSelfOrAncestor.gotmpl" (dict "page" . "to" $.to) .Path $.to.Path }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- return $ret }} |