Merge pull request #508 from schnerring/flexsearch-description
Add .Summary as fallback for description
This commit is contained in:
commit
6a7df65298
|
@ -103,7 +103,11 @@ Source:
|
||||||
id: {{ $index }},
|
id: {{ $index }},
|
||||||
href: "{{ .RelPermalink }}",
|
href: "{{ .RelPermalink }}",
|
||||||
title: {{ .Title | jsonify }},
|
title: {{ .Title | jsonify }},
|
||||||
description: {{ .Params.description | jsonify }},
|
{{ with .Description -}}
|
||||||
|
description: {{ . | jsonify }},
|
||||||
|
{{ else -}}
|
||||||
|
description: {{ .Summary | plainify | jsonify }},
|
||||||
|
{{ end -}}
|
||||||
content: {{ .Content | jsonify }}
|
content: {{ .Content | jsonify }}
|
||||||
})
|
})
|
||||||
{{ if ne (add $index 1) $len -}}
|
{{ if ne (add $index 1) $len -}}
|
||||||
|
|
|
@ -19,7 +19,11 @@
|
||||||
{{ with .Description -}}
|
{{ with .Description -}}
|
||||||
<meta name="description" content="{{ . }}">
|
<meta name="description" content="{{ . }}">
|
||||||
{{ else -}}
|
{{ else -}}
|
||||||
<meta name="description" content="{{ .Site.Params.description }}">
|
{{ with .Summary | plainify -}}
|
||||||
|
<meta name="description" content="{{ . }}">
|
||||||
|
{{ else -}}
|
||||||
|
<meta name="description" content="{{ .Site.Params.description }}">
|
||||||
|
{{ end -}}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
{{ if $.Scratch.Get "paginator" }}
|
{{ if $.Scratch.Get "paginator" }}
|
||||||
|
|
Loading…
Reference in New Issue