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

github.com/reuixiy/hugo-theme-meme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorreuixiy <reuixiy@gmail.com>2020-06-25 05:41:20 +0300
committerreuixiy <reuixiy@gmail.com>2020-06-25 05:41:20 +0300
commit8ebbfa81a5a517038b24e20768b8db2dda812649 (patch)
tree351ab316141820a586e47acd9d311a9faeeeb372
parentf1e35035e0b92d80881743adbbfa523839e27019 (diff)
fix: remove extra white space in summary.html
due to multi-line comments
-rw-r--r--layouts/partials/utils/summary.html11
1 files changed, 4 insertions, 7 deletions
diff --git a/layouts/partials/utils/summary.html b/layouts/partials/utils/summary.html
index 673a8bf..aec385b 100644
--- a/layouts/partials/utils/summary.html
+++ b/layouts/partials/utils/summary.html
@@ -1,14 +1,11 @@
-{{ if .Truncated -}}
+{{- $summary := .Summary -}}
+{{- if .Truncated -}}
<!-- For the CJK language, add ellipsis. -->
{{- if .Params.isCJKLanguage -}}
- {{- .Summary -}}
- {{- i18n "ellipsis" -}}
+ {{- $summary = printf `%s%s` .Summary (i18n "ellipsis") -}}
<!-- For the other languages, no need. -->
<!-- Hugo’s automatic summary split method will split until end of sentence. -->
<!-- (Tested English Only) -->
- {{- else -}}
- {{- .Summary -}}
{{- end -}}
-{{- else -}}
- {{- .Summary -}}
{{- end -}}
+{{- return $summary -}}