{{- /* Structured Data for SEO */ -}}
{{- $isPost := and (eq .Type "posts") (eq .Kind "page") -}}
{{- $authorName := "Xinwei Xiong" -}}
{{- with site.Params.author -}}
{{- if reflect.IsMap . -}}
{{- $authorName = .name | default "Xinwei Xiong" -}}
{{- else if reflect.IsSlice . -}}
{{- $authorName = index . 0 | default "Xinwei Xiong" -}}
{{- else -}}
{{- $authorName = . -}}
{{- end -}}
{{- end -}}
{{- $siteName := site.Title -}}
{{- /* Publisher logo: schema.org wants a raster ≥112×112 — use the
180×180 apple-touch-icon PNG, not the .ico favicon. */ -}}
{{- $logo := site.Params.assets.apple_touch_icon | default "/apple-touch-icon.png" | absURL -}}
{{- /* Article Schema */ -}}
{{- if $isPost -}}
{{- end -}}
{{- /* WebSite Schema */ -}}
{{- /* Person/Author Schema */ -}}
{{- /* BreadcrumbList Schema */ -}}
{{- if .Parent -}}
{{- $ancestors := slice -}}
{{- $p := .Parent -}}
{{- range seq 10 -}}
{{- if $p -}}
{{- $ancestors = $ancestors | append $p -}}
{{- $p = $p.Parent -}}
{{- end -}}
{{- end -}}
{{- $ancestors = collections.Reverse $ancestors -}}
{{- end -}}