diff options
author | it-gro <grossnik@tuvok> | 2018-06-28 14:46:53 +0300 |
---|---|---|
committer | it-gro <grossnik@tuvok> | 2018-06-28 14:46:53 +0300 |
commit | 7df3f667f79fc49fdb2c89e05e5c78c7da131eb7 (patch) | |
tree | a36b473bd9916fe88cc267e20c47641394986e5a /layouts | |
parent | be54d60e098940288be5324a681f91b809d6752a (diff) |
Add config truncateSummaryForMetaDescription
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/partials/head.meta.html | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/layouts/partials/head.meta.html b/layouts/partials/head.meta.html index 97ea3d7..b56cc25 100644 --- a/layouts/partials/head.meta.html +++ b/layouts/partials/head.meta.html @@ -8,7 +8,7 @@ <meta name="googlebot" content="index,follow,snippet,archive" /> <meta name="author" content='{{ $.Site.Params.authorName }}' /> - {{- if or .Keywords .Params.tags .Params.categories -}} + {{- if or .Keywords .Params.tags .Params.categories }} <meta name="keywords" content='{{ if .Keywords }} {{ chomp (delimit .Keywords `, ` ) }},{{ end -}} {{ if .Params.tags }} {{ chomp (delimit .Params.tags `, ` ) }},{{ end -}} {{ if .Params.categories }} {{ chomp (delimit .Params.categories `, ` ) }} {{ end -}}' /> @@ -18,6 +18,8 @@ {{- if .Description }} <meta name="description" content='{{- chomp .Description -}}' /> + {{- else if .Summary }} + <meta name="description" content='{{- chomp (.Summary | truncate (or $.Site.Params.truncateSummaryForMetaDescription 160) ) -}}' /> {{- else if $.Site.Params.DefaultDescription }} <meta name="description" content='{{- chomp $.Site.Params.defaultDescription -}}' /> {{- end -}} |