Need some help with slightly complex handlebars processing

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).

Hi, can anyone help me with this please?

You can filter out certain tags in the “all categories” as:

{{#get "posts" limit="3" filter="tag:-technology+tag:-secondcategory" include="authors,tags"}}

I want to exclude the posts in the tag feed which are present in the all categories feed. Is that possible?