{{ $path := "" }} {{ with .File }} {{ $path = .Path }} {{ else }} {{ $path = .Path }} {{ end }} {{ $currentVersion := index (split $path "/") 1 }} {{ $versionDocsPath := printf "content/docs/%s" $currentVersion }} {{ $url := .RelPermalink }}