hello
This commit is contained in:
parent
349b28a7ce
commit
b2a82dfa53
1 changed files with 5 additions and 1 deletions
|
@ -5,6 +5,10 @@
|
||||||
{{ $allposts := (where site.RegularPages "Section" "=" "blog")}}
|
{{ $allposts := (where site.RegularPages "Section" "=" "blog")}}
|
||||||
{{ $allposts = $allposts.ByDate.Reverse }}
|
{{ $allposts = $allposts.ByDate.Reverse }}
|
||||||
{{ $context := (page.GetPage "/blog")}}
|
{{ $context := (page.GetPage "/blog")}}
|
||||||
|
{{ $ammount := 9 }}
|
||||||
|
{{ if .ammount }}
|
||||||
|
{{ $ammount := (cast.ToInt .ammount) }}
|
||||||
|
{{ end }}
|
||||||
{{ if (eq (len $allposts) 0) }}
|
{{ if (eq (len $allposts) 0) }}
|
||||||
<div
|
<div
|
||||||
class="section-error-container transition-child"
|
class="section-error-container transition-child"
|
||||||
|
@ -17,7 +21,7 @@
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<div
|
<div
|
||||||
class="articles">
|
class="articles">
|
||||||
{{ range $index, $article := ($context.Page.Paginate $allposts .ammount).Pages }}
|
{{ range $index, $article := ($context.Page.Paginate $allposts (cast.ToInt $ammount)).Pages }}
|
||||||
<a class=article href="{{ $article.RelPermalink }}">
|
<a class=article href="{{ $article.RelPermalink }}">
|
||||||
<article>
|
<article>
|
||||||
<div
|
<div
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue