{{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }} {{ $page := .Page }} {{ range $index, $element := split $url "/" }} {{ if $page }} {{ $.Scratch.Add "urls" (slice $page.Permalink) }} {{ $.Scratch.Add "titles" (slice $page.LinkTitle) }} {{ $.Scratch.Add "descriptions" (slice $page.Description) }} {{ $page = $page.Parent }} {{ end }} {{ end }}