diff options
author | Mohammed Al Sahaf <msaa1990@gmail.com> | 2020-03-23 23:26:56 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-23 23:26:56 +0300 |
commit | f5078a1802ad1bd7e7d0106583fbb0d6469b42ad (patch) | |
tree | 0af32cc467040063f5881571700437590048656d | |
parent | 36bafaf53cbf9fcfcb0db8fcd48c613ce2e7f8bf (diff) |
Include page title if exists
-rw-r--r-- | layouts/partials/head.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 998cb3d..fc98683 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -4,7 +4,7 @@ <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="format-detection" content="telephone=no"/> - <title>{{ .Site.Title }}</title> + <title>{{ if .Title }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title> <!-- Icons --> <link rel="apple-touch-icon" sizes="180x180" href="{{ "apple-touch-icon.png" | relURL }}"> <link rel="icon" type="image/png" sizes="32x32" href="{{ "favicon-32x32.png" | relURL }}"> @@ -30,4 +30,4 @@ {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{ end }} {{ template "_internal/google_analytics.html" . }} -</head>
\ No newline at end of file +</head> |