diff options
author | Michael Schnerring <3743342+schnerring@users.noreply.github.com> | 2021-10-13 18:17:28 +0300 |
---|---|---|
committer | Michael Schnerring <3743342+schnerring@users.noreply.github.com> | 2021-10-13 18:17:28 +0300 |
commit | 434396b612215454f6c193b09523505f8c65f4ce (patch) | |
tree | 4bceb6e8e6beaabe90ce7c2fe11be96321b4078d /assets | |
parent | b1227d78ccfff972e9bd983acc971317758acc74 (diff) |
Add .Summary as fallback for description
Diffstat (limited to 'assets')
-rw-r--r-- | assets/js/index.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/assets/js/index.js b/assets/js/index.js index c10a58b..da99b54 100644 --- a/assets/js/index.js +++ b/assets/js/index.js @@ -104,7 +104,11 @@ Source: id: {{ $index }}, href: "{{ .RelPermalink }}", title: {{ .Title | jsonify }}, - description: {{ .Params.description | jsonify }}, + {{ with .Description -}} + description: {{ . | jsonify }}, + {{ else -}} + description: {{ .Summary | plainify | jsonify }}, + {{ end -}} content: {{ .Content | jsonify }} }) {{ if ne (add $index 1) $len -}} |