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
|
@ -9,6 +9,7 @@ pagination.pagerSize = 5
|
|||
[params]
|
||||
contentTypeName = "posts"
|
||||
showMenuItems = 2
|
||||
postsToShowOnIndex = 3
|
||||
fullWidthTheme = false
|
||||
centerTheme = false
|
||||
|
||||
|
@ -18,6 +19,8 @@ pagination.pagerSize = 5
|
|||
subtitle = "A simple, retro theme for Hugo"
|
||||
keywords = ""
|
||||
copyright = ""
|
||||
|
||||
[languages.en.params]
|
||||
menuMore = "Show more"
|
||||
readMore = "Read more"
|
||||
readOtherPosts = "Read other posts"
|
||||
|
|
|
@ -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