summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroninro <liumy.f@foxmail.com>2022-07-30 18:31:58 +0800
committerroninro <liumy.f@foxmail.com>2022-07-30 18:31:58 +0800
commitec4032336c8bc14649823f0899694b9c41f6d0b2 (patch)
tree534522ae4e87761ba4cc629d0bbdd0b1595a40d1
parent0ec9d99f24fcc6580570fc1e30f084484acd0910 (diff)
fix title
-rw-r--r--layouts/_default/baseof.html6
1 files changed, 2 insertions, 4 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index dc22bdc..f88f2d9 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -7,10 +7,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
{{ $title := .Title }}
- {{ if gt (len $title) 0 }}
- {{ $title = print $title " | " .Site.Title }}
- {{ else }}
- {{ $title = .Site.Title }}
+ {{ if not .IsHome }}
+ {{ $title = printf "%s | %s" .Title .Site.Title }}
{{ end }}
<title>{{ $title }}</title>