diff options
author | reuixiy <reuixiy@gmail.com> | 2020-06-25 05:41:20 +0300 |
---|---|---|
committer | reuixiy <reuixiy@gmail.com> | 2020-06-25 05:41:20 +0300 |
commit | 8ebbfa81a5a517038b24e20768b8db2dda812649 (patch) | |
tree | 351ab316141820a586e47acd9d311a9faeeeb372 | |
parent | f1e35035e0b92d80881743adbbfa523839e27019 (diff) |
fix: remove extra white space in summary.html
due to multi-line comments
-rw-r--r-- | layouts/partials/utils/summary.html | 11 |
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 -}} |