Update index page to link to all posts
This commit is contained in:
parent
5a2b4c0f1f
commit
f57ac2b8cc
2 changed files with 32 additions and 30 deletions
|
@ -12,9 +12,7 @@
|
|||
{{ if .IsHome }}
|
||||
{{ $PageContext = .Site }}
|
||||
{{ end }}
|
||||
{{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }}
|
||||
|
||||
{{ range $paginator.Pages }}
|
||||
{{ range ( where .Site.RegularPages "Type" "posts" | first .Site.Params.postsToShowOnIndex) }}
|
||||
<article class="post on-list">
|
||||
<h2 class="post-title">
|
||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||
|
@ -60,7 +58,8 @@
|
|||
{{ end }}
|
||||
</article>
|
||||
{{ end }}
|
||||
|
||||
{{ partial "pagination.html" . }}
|
||||
<center>
|
||||
<a href="/posts" class="button inline" >[Go to all posts]</a>
|
||||
</center>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue