diff options
Diffstat (limited to 'layouts/partials')
| -rw-r--r-- | layouts/partials/templates/doublinecore.html | 2 | ||||
| -rw-r--r-- | layouts/partials/templates/opengraph.html | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/layouts/partials/templates/doublinecore.html b/layouts/partials/templates/doublinecore.html index 674d343..04e8ae6 100644 --- a/layouts/partials/templates/doublinecore.html +++ b/layouts/partials/templates/doublinecore.html @@ -11,4 +11,4 @@ <meta property="dc:source" content="{{ if .Params.source }}{{ .Params.source }}{{ else }}{{ site.Title }}{{ end }}"> {{- with .Params.date }} {{ printf "<meta property=\"dc:date\" content=\"%s\">" (.UTC.Format "2006-01-02T15:04:05-07:00") | safeHTML }} -{{- end }} +{{- end -}} diff --git a/layouts/partials/templates/opengraph.html b/layouts/partials/templates/opengraph.html index e3dad0f..c94fd68 100644 --- a/layouts/partials/templates/opengraph.html +++ b/layouts/partials/templates/opengraph.html @@ -1,6 +1,6 @@ <!-- Open Graph metadata --> <meta property="og:title" content="{{ .Title }}"> - <meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}"> + <meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ replaceRE "\n" " " (.Summary | truncate 170) }}{{ else }}{{ with site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}"> <meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}"> <meta property="og:url" content="{{ .Permalink }}"> {{- if .Params.cover.image -}} |
