From f28aaef6d3e75278927c2c2696050feab0ff090c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Zaj=C4=85czkowski?= Date: Thu, 13 Feb 2020 14:18:02 +0100 Subject: [PATCH] Ability to display well formatter longer description in talks page By default content is used as a subtitle - displayed right under Title without extra formatting (to keep backward compatibility). However, it doesn't look good to longer (multiline) content (margins, etc.). For that cases there is an option to define the Subtitle parameter in _index.md to render is as a subtitle and then .Content is rendered within the main tag with better formatting. --- layouts/talks/list.html | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/layouts/talks/list.html b/layouts/talks/list.html index b674147..089bdd0 100644 --- a/layouts/talks/list.html +++ b/layouts/talks/list.html @@ -5,11 +5,21 @@

{{ .Title }}

+ {{ if not .Params.subtitle }}
{{ .Content }}
+ {{ end }}
+ {{ if .Params.subtitle }} +
+ {{ .Content }} +
+

+ {{ .Params.subtitle }} +

+ {{ end }}
{{ $pages := (where .Site.RegularPages "Section" "talks") }} {{ $paginator := .Paginate ($pages.GroupByPublishDate ($.Param "talksGroupByDate" | default "2006")) ($.Param "talksPaginate") }}