From e51a0477496816e779c50488c7ef2de7346e970e Mon Sep 17 00:00:00 2001 From: Quentin Duchemin Date: Tue, 25 May 2021 00:25:58 +0200 Subject: [PATCH] summaryLenght is broken for me, use truncate for uniform summaries --- config.yaml | 1 - themes/chosto/layouts/_default/summary.html | 23 ++++++++++++++------- themes/chosto/layouts/partials/header.html | 2 +- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/config.yaml b/config.yaml index a572edb..ac09311 100644 --- a/config.yaml +++ b/config.yaml @@ -8,7 +8,6 @@ languageCode: fr-fr languageName: Français watch: true paginate: 5 -summaryLength: 50 permalinks: # All pages under posts section will have this link structure diff --git a/themes/chosto/layouts/_default/summary.html b/themes/chosto/layouts/_default/summary.html index dd80f58..87af796 100644 --- a/themes/chosto/layouts/_default/summary.html +++ b/themes/chosto/layouts/_default/summary.html @@ -32,13 +32,20 @@
- {{ .Summary }} + {{ .Content | plainify | safeHTML | truncate 300 "..." }} - + diff --git a/themes/chosto/layouts/partials/header.html b/themes/chosto/layouts/partials/header.html index 8ed9274..a4af09b 100644 --- a/themes/chosto/layouts/partials/header.html +++ b/themes/chosto/layouts/partials/header.html @@ -13,7 +13,7 @@ {{ end }} - {{ if (and .IsPage (eq .FirstSection "posts"))}} + {{ if (and .IsPage (eq .FirstSection.Section "posts"))}}