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:
parent
2ddb8878d6
commit
8c4df57d4f
1 changed files with 2 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
{{ 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 }}
|
||||
|
|
Loading…
Reference in a new issue