Skip to content

Commit

Permalink
Fixed bug with listing of contents (that was showing all posts instea…
Browse files Browse the repository at this point in the history
…d of the selection)
  • Loading branch information
Bernard `Guyzmo` Pratz committed Sep 4, 2016
1 parent 8c20598 commit 215fd1c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion themes/amstrad-theme/layouts/_default/list.html
@@ -1,8 +1,15 @@
{{ partial "header" . }}
{{ partial "navigation" . }}

{{ if eq .Title "Blogs" }}
{{ .Scratch.Add "pages" .Site.Pages }}
{{ else }}
{{ .Scratch.Add "pages" .Data.Pages }}
{{ end }}

<div class="container clearfix">
<main role="main" class="content">
{{ $paginator := .Paginate (where .Site.Pages "Type" "!=" "ignore") }}
{{ $paginator := .Paginate (where (.Scratch.Get "pages") "Type" "post") }}
{{ range $paginator.Pages }}
{{ .Render "summary" }}
{{ end }}
Expand Down
4 changes: 2 additions & 2 deletions themes/amstrad-theme/layouts/partials/navigation.html
Expand Up @@ -6,8 +6,8 @@
<a href="{{ .Site.BaseURL }}/{{ .Section }}">{{ .Section }}/</a><a href="{{ .Permalink }}">{{ slicestr (.UniqueID) 0 6 }}</a>
{{ end }}
{{ if .IsNode }}
{{ if .Data.Plural }}
{{ if eq .Data.Plural "tags" }}
{{ if eq .Data.Plural "tags" }}
{{ if eq .Title "Tags" }}
<a href="{{ .Site.BaseURL }}/tags">tags/</a>
{{ else }}
<a href="{{ .Site.BaseURL }}/tags">tags/</a><a href="#">{{ .Title | singularize | lower }}/</a>
Expand Down

0 comments on commit 215fd1c

Please sign in to comment.