<head>
{{ partial "meta.html" . }}
<base href="{{ .Site.BaseURL }}">
<title>
{{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }}
{{ if eq $url "/" }}
    {{ .Site.Title }}
{{ else }}
    {{ if .Params.heading }} {{ .Params.heading }} {{ else }} {{ .Title }} {{ end }}
{{ end }}
</title>
<link rel="canonical" href="{{ .Permalink }}">
{{ partial "head_includes.html" . }}
</head>
