From 326f9f2cda46e9522bfe205bda22881b909b2952 Mon Sep 17 00:00:00 2001 From: vimux Date: Mon, 14 Jan 2019 10:14:41 -0500 Subject: [PATCH] Include .Content block (if exist) for main page --- layouts/index.html | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/layouts/index.html b/layouts/index.html index 20bdb1a..ea47e5c 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,13 +1,18 @@ {{ define "main" }}
+ {{- if .Content }} +
+ {{ with .Content }}
{{ . }}
{{ end }} +
+ {{- end }}
- {{ $mainSections := .Site.Params.mainSections | default (slice "post") }} - {{ $paginator := .Paginate (where .Data.Pages "Section" "in" $mainSections) }} - {{ range $paginator.Pages }} + {{- $mainSections := .Site.Params.mainSections | default (slice "post") }} + {{- $paginator := .Paginate (where .Data.Pages "Section" "in" $mainSections) }} + {{- range $paginator.Pages }}
{{ .Render "summary" }}
- {{ end }} + {{- end }}
{{- if and (not .Site.Params.hideNoPostsWarning) (eq $paginator.TotalNumberOfElements 0) }}