{{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }} {{ if eq $url "/" }} {{ $.Scratch.Set "title" .Site.Title }} {{ else }} {{ $.Scratch.Set "title" .Title }} {{ end }}