From 523098f87e9abe68ad8f217844fe62432840519c Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 24 Jul 2020 15:19:59 +0530 Subject: [PATCH] fix: make homeInfo available only on home and not all pages --- layouts/_default/index.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/layouts/_default/index.html b/layouts/_default/index.html index 3b1284b..938fbee 100644 --- a/layouts/_default/index.html +++ b/layouts/_default/index.html @@ -8,15 +8,15 @@ {{ end }} {{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }} -{{- if (and $.IsHome (eq $.Site.Params.homeInfoParams.enabled true)) }} -{{- partial "homeInfo.html" . }} -{{ end }} - {{- range $index, $page := $paginator.Pages }} {{- $class := "post-entry" }} -{{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) (ne $.Site.Params.homeInfoParams.enabled true)) }} +{{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0)) }} +{{- if (eq $.Site.Params.homeInfoParams.enabled true) }} +{{- partial "homeInfo.html" . }} +{{else}} {{- $class = "first-entry" }} +{{ end }} {{- else if .Data.Term }} {{- $class = "post-entry tag-entry" }} {{- end }}