Replace new line with space in descriptions.

This commit is contained in:
Fredrik Jonsson 2017-10-24 11:52:47 +02:00
commit a6d403f2cc
2 changed files with 2 additions and 2 deletions

View file

@ -6,7 +6,7 @@
"datePublished": "{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}",
"dateModified": "{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}",
"url" : "{{ .Permalink }}",
"description": {{ with (replaceRE "\n" "" (.Description | default .Summary)) }}{{ . | jsonify }}{{ end }},
"description": {{ with (replaceRE "\n" " " (.Description | default .Summary)) }}{{ . | jsonify }}{{ end }},
{{ with .Params.tags -}}
"keywords": {{ . | jsonify }},
{{ end -}}

View file

@ -1,4 +1,4 @@
<meta name="description" content="{{ replaceRE "\n" "" (.Description | default .Summary) }}">
<meta name="description" content="{{ replaceRE "\n" " " (.Description | default .Summary) }}">
<meta name="created" content="{{ .Date.Format "2006-01-02T15:04:05-0700" }}">
<meta name="modified" content="{{ .Lastmod.Format "2006-01-02T15:04:05-0700" }}">
{{ with $.Param "author" }}<meta name="author" content="{{ . }}">{{ end }}