Fix issue with wrong pluralization of section title

This commit is contained in:
Djordje Atlialp 2020-05-13 08:40:09 +02:00
parent b32fd358d3
commit 9f3c15b70e
No known key found for this signature in database
GPG key ID: 50C5BBECF350BB74

View file

@ -1,7 +1,5 @@
{{ define "main" }}
{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }}
{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) .Section }}
{{ $paginator := .Paginate (where .Site.RegularPages "Type" $contentTypeName) }}
{{ $paginator := .Paginate (where .Site.RegularPages "Type" $.Site.Params.contentTypeName) }}
<main class="posts">
<h1>{{ .Title }}</h1>