On my home page, I show the 3 most recent posts across all categories and the 3 recent posts from some tags. Basically, something like this:
- Recent posts
{{#get "posts" limit="3" include="authors,tags"}}
{{#foreach posts}}
{{> "post-card"}}
{{/foreach}}
{{/get}}
- Recent posts from a few categories. Showing one as an example
{{#get "posts" filter="tag:technology" limit="3" include="authors"}}
{{#foreach posts}}
{{> "post-card"}}
{{/foreach}}
{{/get}}
Invariably, what happens is that there is some repetition. One of the 3 recent posts could be tagged technology and it ends up showing twice in the recent posts feed and the technology feed. How do I capture the IDs of the 3 recent posts so that I could put that as a filter in the category feed?
Any help would be greatly appreciated. And if it helps, I am on Ghost (Pro).