Use .Summary instead of .Content for og:description and twitter:description

This commit is contained in:
Li-Wen Yip 2017-03-25 13:09:09 +00:00
commit b7864a3f48

View file

@ -38,7 +38,7 @@
{{ else if .Params.subtitle }} {{ else if .Params.subtitle }}
<meta property="og:description" content="{{ .Params.subtitle }}"> <meta property="og:description" content="{{ .Params.subtitle }}">
{{ else }} {{ else }}
<meta property="og:description" content="{{ .Content | plainify | htmlEscape | truncate 200 }}"> <meta property="og:description" content="{{ .Summary }}">
{{ end }} {{ end }}
<meta property="og:type" content="website" /> <meta property="og:type" content="website" />
@ -77,7 +77,7 @@
{{ else if .Params.subtitle }} {{ else if .Params.subtitle }}
<meta name="twitter:description" content="{{ .Params.subtitle }}"> <meta name="twitter:description" content="{{ .Params.subtitle }}">
{{ else }} {{ else }}
<meta name="twitter:description" content="{{ .Content | plainify | htmlEscape | truncate 200 }}"> <meta name="twitter:description" content="{{ .Summary }}">
{{ end }} {{ end }}
{{ if .Params.share_img }} {{ if .Params.share_img }}