mirror of https://github.com/escalate/hugo-split-theme.git

Felix Boerner
25.19.2018 e7b2132fe17c937ebcb7ee2394cf66ce7726887e
feat: change title behaviour

Use site title only if it's the homepage
Use page title with site title together if it's a regular page
1 files modified
4 ■■■■ changed files
layouts/partials/head.html 4 ●●●● patch | view | raw | blame | history
layouts/partials/head.html
@@ -2,14 +2,14 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- SEO -->
<title>{{ .Title }}</title>
<title>{{ if .IsPage }}{{ .Title }} - {{ end }}{{ .Site.Title }}</title>
{{ with .Site.Params.author }}<meta name="author" content="{{ . }}" />{{ end }}
{{ with .Site.Params.description }}<meta name="description" content="{{ . }}" />{{ end }}
<meta name="robots" content="index, follow" />
<meta name="referrer" content="always" />
<!-- Social & Open Graph -->
<meta property="og:title" content="{{ .Title }}" />
<meta property="og:title" content="{{ if .IsPage }}{{ .Title }} - {{ end }}{{ .Site.Title }}" />
{{ with .Site.Params.description }}<meta property="og:description" content="{{ . }}" />{{ end }}
<meta property="og:url" content="{{ .Site.BaseURL }}" />
{{ with .Site.Params.shareImage }}