1

Gestion du JSON-LD

This commit is contained in:
2026-03-16 21:21:27 +01:00
parent 7676fe3e22
commit b518d573bc
14 changed files with 275 additions and 8 deletions

View File

@@ -0,0 +1,23 @@
{{- $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 -}}