fix: make homeInfo available only on home

and not all pages
This commit is contained in:
Aditya Telange 2020-07-24 15:19:59 +05:30
parent 8356e48e47
commit 523098f87e

View File

@ -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 }}