You're in:
{{- /* declare a 'variable' to store the each link position */}}
{{- $data := newScratch }}
{{- range $index, $value := .Ancestors.Reverse }}
-
{{- /* read the index from loop and add 'one', because it starts counting from zero */}}
{{- $data.Set "counter" $index }}
{{- $data.Add "counter" 1 }}
{{ if .IsHome }}
home
{{ else }}
{{.Title}}
{{ end }}
{{- /* pass the counter value into schema attribute */}}
{{- end }}
-
{{- /* add 'one' one more time for the last link position */}}
{{- $data.Add "counter" 1 }}
{{.Title}}
{{- /* pass the counter value into schema attribute */}}