diff --git a/config/_default/params.toml b/config/_default/params.toml index d15943ef9..fecae89b8 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -90,6 +90,7 @@ forgejoDefaultServer = "https://v8.next.forgejo.org" layoutBackgroundHeaderSpace = true # only used when heroStyle equals background showBreadcrumbs = false showSummary = false + plainifySummary = true # only used when showSummary = true showViews = false showLikes = false showTableOfContents = false diff --git a/layouts/partials/article-link/card-related.html b/layouts/partials/article-link/card-related.html index b1369a134..cc4a77b38 100644 --- a/layouts/partials/article-link/card-related.html +++ b/layouts/partials/article-link/card-related.html @@ -65,7 +65,11 @@ {{ if .Params.showSummary | default (.Site.Params.list.showSummary | default false) }}
+ {{- if .Params.plainifySummary | default (.Site.Params.list.plainifySummary | default true) }} + {{ .Summary | plainify }} + {{- else }} {{ .Summary }} + {{- end }}
{{ end }} diff --git a/layouts/partials/article-link/card.html b/layouts/partials/article-link/card.html index b01603e9b..8bf65ca81 100644 --- a/layouts/partials/article-link/card.html +++ b/layouts/partials/article-link/card.html @@ -66,7 +66,11 @@ {{ if .Params.showSummary | default (.Site.Params.list.showSummary | default false) }}
+ {{- if .Params.plainifySummary | default (.Site.Params.list.plainifySummary | default true) }} + {{ .Summary | plainify }} + {{- else }} {{ .Summary }} + {{- end }}
{{ end }} diff --git a/layouts/partials/article-link/simple.html b/layouts/partials/article-link/simple.html index a230b2deb..1008ddb6b 100644 --- a/layouts/partials/article-link/simple.html +++ b/layouts/partials/article-link/simple.html @@ -94,7 +94,11 @@ {{ if .Params.showSummary | default (.Site.Params.list.showSummary | default false) }}
+ {{- if .Params.plainifySummary | default (.Site.Params.list.plainifySummary | default true) }} + {{ .Summary | plainify }} + {{- else }} {{ .Summary }} + {{- end }}
{{ end }}