Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/h-enk/doks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorMichael Schnerring <3743342+schnerring@users.noreply.github.com>2021-10-13 18:17:28 +0300
committerMichael Schnerring <3743342+schnerring@users.noreply.github.com>2021-10-13 18:17:28 +0300
commit434396b612215454f6c193b09523505f8c65f4ce (patch)
tree4bceb6e8e6beaabe90ce7c2fe11be96321b4078d /assets
parentb1227d78ccfff972e9bd983acc971317758acc74 (diff)
Add .Summary as fallback for description
Diffstat (limited to 'assets')
-rw-r--r--assets/js/index.js6
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 -}}