Website Summary Files Commits Branches @commit @diff @stats
path: root / layouts / partials / homepage.html
diff options
context:
space:
mode:
1 files changed, 5 insertions, 2 deletions
-rw-r--r--layouts/partials/homepage.html7
diff --git a/layouts/partials/homepage.html b/layouts/partials/homepage.html
index cdbc78e..2dcfec7 100644
--- a/layouts/partials/homepage.html
+++ b/layouts/partials/homepage.html
@@ -5,12 +5,15 @@
<h1 class="headline">Recent Posts</h1>
+ {{ $paginator := .Paginate (where .Site.RegularPages "Section" "post") (or .Site.Params.paginate 3) }}
<div class="article-list">
- {{ range first 3 (where .Data.Pages "Section" "post") }}
+ {{ range $paginator.Pages }}
{{ partial "article-list-item.html" . }}
{{ end }}
</div>
+ {{ partial "paginator.html" $paginator }}
+
{{ with .Site.Taxonomies.categories }}
<h1 class="headline">Categories</h1>
@@ -18,7 +21,7 @@
<section class="categories">
{{ range $name, $value := . }}
<h2 class="category">
- <a href="{{ $baseurl }}categories/{{ $name | urlize }}">{{ title $name }}</a>
+ <a href="{{ $baseurl }}categories/{{ $name | urlize }}">{{ humanize $name | title }}</a>
<small>({{ .Count }})</small>
</h2>
{{ end }}