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
1 changed files with 5 additions and 5 deletions

View File

@ -8,15 +8,15 @@
{{ end }} {{ end }}
{{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }} {{ $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 }} {{- range $index, $page := $paginator.Pages }}
{{- $class := "post-entry" }} {{- $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" }} {{- $class = "first-entry" }}
{{ end }}
{{- else if .Data.Term }} {{- else if .Data.Term }}
{{- $class = "post-entry tag-entry" }} {{- $class = "post-entry tag-entry" }}
{{- end }} {{- end }}