From c7b06a08bc6525cea2de81e2434eeb03ce0519fb Mon Sep 17 00:00:00 2001
From: weru <fromweru@gmail.com>
Date: Sun, 06 Dec 2020 15:09:33 +0000
Subject: [PATCH] avoid repetition in page title
---
layouts/partials/head.html | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 48daebf..7b2b82f 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -8,11 +8,13 @@
<link rel="manifest" href='{{ absURL (printf "%ssite.webmanifest" $iconsPath) }}'>
<link rel="mask-icon" href='{{ absURL (printf "%ssafari-pinned-tab.svg" $iconsPath) }}' color="#004750">
<link rel="shortcut icon" href='{{ absURL (printf "%sfavicon.ico" $iconsPath) }}'>
-<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-config" content='{{ absURL (printf "%sbrowserconfig.xml" $iconsPath) }}'>
-<meta name="theme-color" content="#ffffff">
-
-<title>{{ if and .Title (ne (trim (lower .Site.Title) "") (trim (lower .Title) "")) }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title>
+{{- $t := .Title }}
+{{- $s := .Site.Title }}
+{{- if in (lower $s) (lower $t) }}
+ {{- $t = false }}
+{{- end }}
+<title>{{ if and $t (ne (trim (lower $s) "") (trim (lower $t) "")) }}{{ $t }} | {{ end }}{{ $s }}</title>
{{- partial "opengraph" . }}
--
Gitblit v1.10.0