Gestion du JSON-LD
This commit is contained in:
23
layouts/partials/seo/breadcrumb-pages.html
Normal file
23
layouts/partials/seo/breadcrumb-pages.html
Normal 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 -}}
|
||||
Reference in New Issue
Block a user