{{ $isHome := eq .Kind "home" }} {{ $description := cond $isHome site.Params.tagline .Params.description }} {{ $isDoc := eq .Section "docs" }} {{ $type := cond $isHome "website" "article" }} {{ $twitterHandle := site.Params.twitterHandle }} {{ $imageUrl := printf "%s%s" site.BaseURL site.Params.openGraphImage }} {{ if $isHome -}} {{ end -}} {{ with $description }} {{ end }} {{ hugo.Generator }} {{ if $isDoc }} {{ $path := "" }} {{ with .File }} {{ $path = .Path }} {{ else }} {{ $path = .Path }} {{ end }} {{ $version := index (split $path "/") 1 }} {{ $latest := site.Params.latest }} {{ $url := .RelPermalink }} {{ if in site.Params.versions $version }} {{ $url = replace .RelPermalink $version $latest }} {{ end }} {{ else }} {{ end }} {{ if not $isHome }} {{ end }} {{ with $description }} {{ end }}