I set up routing and custom collections like this:
routes:
collections:
/:
permalink: /article/{slug}/
template: index
filter: 'tag:hash-article'
/podcast/:
permalink: /podcast/{slug}/
template: index
filter: 'tag:hash-podcast'
taxonomies:
tag: /tag/{slug}/
author: /author/{slug}/
In my index.hbs file, I want to show a section with the latest articles and a section with the latest podcasts.
I have this and it works fine for articles:
<div class="gh-postfeed">
{{#foreach posts from="6"}}
{{> "card" page=../pagination.page }} {{!-- partials/card.hbs --}}
{{/foreach}}
</div>
To add posts, I add this:
<div class="gh-podcast">
{{#get "posts" filter="tags:hash-podcast" include="authors,tags"}}
{{#foreach posts}}
{{> "card" page=../pagination.page }} {{!-- partials/card.hbs --}}
{{/foreach}}
{{/get}}
</div>
That places the block, but also adds it to the articles list at the bottom. I tried to solve it by doing this:
<div class="gh-postfeed">
{{#get "posts" filter="tags:hash-article" include="authors,tags"}}
{{#foreach posts from="6"}}
{{> "card" page=../pagination.page }} {{!-- partials/card.hbs --}}
{{/foreach}}
{{/get}}
</div>
However that just loops 6 articles and then puts the podcast at the bottom.
What am I doing wrong?