summaryrefslogtreecommitdiff
path: root/layouts/_default/list.html
diff options
context:
space:
mode:
authorAdam Sullovey <adam.sullovey+git@gmail.com>2017-09-22 21:34:51 -0400
committerAdam Sullovey <adam.sullovey+git@gmail.com>2017-09-22 21:34:51 -0400
commit8c4df57d4fe10a503d3699a4b6cae847fe8e00d5 (patch)
treec9e3090d451bf612daf9e4dffa855cce0c93177c /layouts/_default/list.html
parent2ddb8878d6b3de9c0a8b7ef967554c4fb67c464c (diff)
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.
Diffstat (limited to 'layouts/_default/list.html')
-rw-r--r--layouts/_default/list.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index e8560c6..bc7f4e6 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -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" . }} \ No newline at end of file
+{{ partial "footer.html" . }}