collections:
/music/:
permalink: /music/{slug}/
template: index
filter: primary_tag:music
/newsletter/:
permalink: /newsletter/{slug}/
template: index
filter: primary_tag:newsletter
The second one works as expected and has only the post with the primary tag “newsletter”. But the first one shows all posts, regardless of the primary tag on the index page.
Curiously the URLs are correct according to the route settings, i.e. both /music/ and /newsletter/ posts are included in the first collection.
{{!< default}}
{{!-- The tag above means: insert everything in this file into the body of the default.hbs template --}}
<main class="gh-main">
{{> "components/post-list" feed="index" postFeedStyle=@custom.post_feed_style showTitle=true showSidebar=@custom.show_publication_info_sidebar}}
</main>
Meaning Source? Source makes a #get request (it may be within the partial called in your example - see partials/components/post-list). That get request does not respect routing.
Thanks! I guess, I need to dig deeper here then.
However, I’m wondering why the second route works as expected. It is the same index page. Also, is it possible to achieve the indended behaviour, displaying two separate collection, without custom templates?