fix list page filtering not working

When I started using the blank theme, I found urls like /tags/js would list all posts instead of just posts tagged 'js'. Changing '.Site.Pages' to 'Data.Pages' fixes this, and now my site can have lists that filter posts by category and tags.
This commit is contained in:
Adam Sullovey 2017-09-22 21:34:51 -04:00
parent 2ddb8878d6
commit 8c4df57d4f

View file

@ -1,10 +1,10 @@
{{ partial "header.html" . }}
<main>
{{ $paginator := .Paginate (where .Site.Pages "Type" "post") }}
{{ $paginator := .Paginate (where .Data.Pages "Type" "post") }}
{{ range $paginator.Pages }}
{{ partial "summary.html" . }}
{{ end }}
{{ partial "pagination.html" . }}
</main>
{{ partial "sidebar.html" . }}
{{ partial "footer.html" . }}
{{ partial "footer.html" . }}