{{ partialCached "meta-common" . }} {{if not .Page.IsHome }} {{ end }} {{ if .Page.Params.version }} {{if eq .Page.Params.version "master" }} {{ else }} {{ end }} {{ end }} {{ $ver := .Page.Params.version | default .Site.Params.latest }} {{- if .IsHome -}}{{- .Site.Title | markdownify }} · {{.Site.Params.subtitle | markdownify }} {{- else }}{{- .Title | markdownify}} · {{ .Site.Title | markdownify }} {{ if and (ne .Page.Params.version "0") (ne .Page.Params.version "master")}}v{{ $ver }}{{end}}{{if eq .Page.Params.version "master"}}{{.Page.Params.version }}{{end}}{{ end }} {{/* Don't do the URL processing for KB and Contrib guides */}} {{ if not .Page.Params.Product }} {{/* Strip out the version from the path to get just the section + page */}} {{ $sectionPage := replaceRE (printf "v%s/" .Page.Params.version) "" .RelPermalink }} {{/* Handle the /latest directory */}} {{ if not .Page.Params.version }} {{ $sectionPage = replaceRE "/latest" "" .RelPermalink }} {{ end }} {{/* Handle the /master directory */}} {{ if eq .Page.Params.version "master" }} {{ $sectionPage = replaceRE "/master" "" .RelPermalink }} {{ end }} {{/* Strip training / so .GetPage works */}} {{ $sectionPage = strings.TrimRight "/" $sectionPage }} {{/* Look for the Page matching this page, but in the latest directory */}} {{ $latestPage := .Site.GetPage (printf "/latest%s" $sectionPage) }} {{/* If it exists set the canonical URL to the latest, otherwise we are canonical */}} {{ if $latestPage }} {{ end }} {{ else }} {{ end }} {{ partialCached "stylesheet-cached" . }} {{ partial "stylesheet-dynamic" . }} {{ partialCached "favicons" . }} {{ partial "social" . }} {{ with .OutputFormats.Get "rss" -}} {{ printf `` .Rel .MediaType.Type .Permalink site.Title | safeHTML }} {{ end }}