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
|
@ -4,34 +4,37 @@ theme = "hugo-theme-terminal"
|
||||||
pagination.pagerSize = 5
|
pagination.pagerSize = 5
|
||||||
|
|
||||||
[markup.goldmark.renderer]
|
[markup.goldmark.renderer]
|
||||||
unsafe = true
|
unsafe = true
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
contentTypeName = "posts"
|
contentTypeName = "posts"
|
||||||
showMenuItems = 2
|
showMenuItems = 2
|
||||||
fullWidthTheme = false
|
postsToShowOnIndex = 3
|
||||||
centerTheme = false
|
fullWidthTheme = false
|
||||||
|
centerTheme = false
|
||||||
|
|
||||||
[languages]
|
[languages]
|
||||||
[languages.en]
|
[languages.en]
|
||||||
title = "Terminal"
|
title = "Terminal"
|
||||||
subtitle = "A simple, retro theme for Hugo"
|
subtitle = "A simple, retro theme for Hugo"
|
||||||
keywords = ""
|
keywords = ""
|
||||||
copyright = ""
|
copyright = ""
|
||||||
menuMore = "Show more"
|
|
||||||
readMore = "Read more"
|
|
||||||
readOtherPosts = "Read other posts"
|
|
||||||
|
|
||||||
[languages.en.params.logo]
|
[languages.en.params]
|
||||||
logoText = "Terminal"
|
menuMore = "Show more"
|
||||||
logoHomeLink = "/"
|
readMore = "Read more"
|
||||||
|
readOtherPosts = "Read other posts"
|
||||||
|
|
||||||
[languages.en.menu]
|
[languages.en.params.logo]
|
||||||
[[languages.en.menu.main]]
|
logoText = "Terminal"
|
||||||
identifier = "about"
|
logoHomeLink = "/"
|
||||||
name = "About"
|
|
||||||
url = "/about"
|
[languages.en.menu]
|
||||||
[[languages.en.menu.main]]
|
[[languages.en.menu.main]]
|
||||||
identifier = "showcase"
|
identifier = "about"
|
||||||
name = "Showcase"
|
name = "About"
|
||||||
url = "/showcase"
|
url = "/about"
|
||||||
|
[[languages.en.menu.main]]
|
||||||
|
identifier = "showcase"
|
||||||
|
name = "Showcase"
|
||||||
|
url = "/showcase"
|
||||||
|
|
|
@ -12,9 +12,7 @@
|
||||||
{{ if .IsHome }}
|
{{ if .IsHome }}
|
||||||
{{ $PageContext = .Site }}
|
{{ $PageContext = .Site }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }}
|
{{ range ( where .Site.RegularPages "Type" "posts" | first .Site.Params.postsToShowOnIndex) }}
|
||||||
|
|
||||||
{{ range $paginator.Pages }}
|
|
||||||
<article class="post on-list">
|
<article class="post on-list">
|
||||||
<h2 class="post-title">
|
<h2 class="post-title">
|
||||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||||
|
@ -60,7 +58,8 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</article>
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
<center>
|
||||||
{{ partial "pagination.html" . }}
|
<a href="/posts" class="button inline" >[Go to all posts]</a>
|
||||||
|
</center>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue