Add site title everywhere

This commit is contained in:
Alexis Tacnet
2016-12-06 23:57:06 +01:00
parent 4bf549032a
commit 3065147286

View File

@@ -3,10 +3,10 @@
<base href="{{ .Site.BaseURL }}"> <base href="{{ .Site.BaseURL }}">
<title> <title>
{{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }} {{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }}
{{ if eq $url "/" }} {{ if eq $url "" }}
{{ .Site.Title }} {{ .Site.Title }}
{{ else }} {{ else }}
{{ if .Params.heading }} {{ .Params.heading }} {{ else }} {{ .Title }} {{ end }} {{ if .Params.heading }} {{ .Params.heading }} {{ else }} {{ .Site.Title }} - {{ .Title }} {{ end }}
{{ end }} {{ end }}
</title> </title>
<link rel="canonical" href="{{ .Permalink }}"> <link rel="canonical" href="{{ .Permalink }}">