Skip to content

Commit 215fd1c

Browse files
author
Bernard `Guyzmo` Pratz
committed
Fixed bug with listing of contents (that was showing all posts instead of the selection)
1 parent 8c20598 commit 215fd1c

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

themes/amstrad-theme/layouts/_default/list.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
{{ partial "header" . }}
22
{{ partial "navigation" . }}
3+
4+
{{ if eq .Title "Blogs" }}
5+
{{ .Scratch.Add "pages" .Site.Pages }}
6+
{{ else }}
7+
{{ .Scratch.Add "pages" .Data.Pages }}
8+
{{ end }}
9+
310
<div class="container clearfix">
411
<main role="main" class="content">
5-
{{ $paginator := .Paginate (where .Site.Pages "Type" "!=" "ignore") }}
12+
{{ $paginator := .Paginate (where (.Scratch.Get "pages") "Type" "post") }}
613
{{ range $paginator.Pages }}
714
{{ .Render "summary" }}
815
{{ end }}

themes/amstrad-theme/layouts/partials/navigation.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<a href="{{ .Site.BaseURL }}/{{ .Section }}">{{ .Section }}/</a><a href="{{ .Permalink }}">{{ slicestr (.UniqueID) 0 6 }}</a>
77
{{ end }}
88
{{ if .IsNode }}
9-
{{ if .Data.Plural }}
10-
{{ if eq .Data.Plural "tags" }}
9+
{{ if eq .Data.Plural "tags" }}
10+
{{ if eq .Title "Tags" }}
1111
<a href="{{ .Site.BaseURL }}/tags">tags/</a>
1212
{{ else }}
1313
<a href="{{ .Site.BaseURL }}/tags">tags/</a><a href="#">{{ .Title | singularize | lower }}/</a>

0 commit comments

Comments
 (0)