commit 2ef3d39f5723f2e204f905ed0f32c4af6cadf1a9
parent 352c132a1db08070f3d0f9f300a10e4ba890c9ee
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date: Sun, 12 Apr 2020 22:10:55 -0500
Change summary algorithm and fix home page title
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
@@ -30,8 +30,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
{{ partial "head_custom.html" . }}
<title>
- {{- with .Title }}{{ . }}{{ else -}}
- {{- .Summary }}{{ if .Truncated }}…{{ end -}}
- {{- end -}} | {{ .Site.Title -}}
+ {{- if not .IsHome }}{{ with .Title }}{{ . }}{{ else -}}
+ {{ truncate .Site.Params.summaryLength "…" (plainify .Content) }}
+ {{- end }} | {{ end }}{{ .Site.Title -}}
</title>
</head>