24 lines
623 B
HTML
24 lines
623 B
HTML
{{- $page := . -}}
|
|
{{- with .Page -}}
|
|
{{- $page = . -}}
|
|
{{- end -}}
|
|
{{- $trail := slice $page.Site.Home -}}
|
|
{{- if $page -}}
|
|
{{- range $page.Ancestors.Reverse -}}
|
|
{{- if ne .RelPermalink "/" -}}
|
|
{{- $trail = $trail | append . -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- if eq $page.Kind "term" -}}
|
|
{{- with site.GetPage "taxonomy" $page.Data.Plural -}}
|
|
{{- if not (in $trail .) -}}
|
|
{{- $trail = $trail | append . -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- if ne $page.RelPermalink "/" -}}
|
|
{{- $trail = $trail | append $page -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- return $trail -}}
|