{{ $isHome := eq .Kind "home" }} {{ $title := cond $isHome site.Title .Title }} {{ $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 }} {{ with $description }} {{ end }} {{ hugo.Generator }} {{ if $isDoc }} {{ $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 }}