{{ $p := . }} {{ $basePath := path.Clean (urls.Parse .Site.BaseURL).Path }} {{ if eq $basePath "/" }} {{ $basePath = "" }} {{ end }}