New collection not showing tagged posts (solved, newbie error)

So I’ve been looking at moving to Ghost and spent the last 3 hours trying to work to work out why I was finding it so hard to create a collection. Now I’ve solved it.

Short Version: Is there a place I can suggest updates to the help files please?

Long version:
Posts I tagged (with my newly created tag) wouldn’t show up, but the collection would load as an empty page.
I followed instructions at Ghost Themes - Dynamic URLs & Routing and this bit in particular.

Filtering collections

Much like the {{#get}} helper, collections can be filtered to contain only a subset of content on your site, rather than all of it.

collections:
  /blog/:
    permalink: /blog/{slug}/
    template: blog
    filter: primary_tag:blog
  /podcast/:
    permalink: /podcast/{slug}/
    template: podcast
    filter: primary_tag:podcast

Eventually, I found another post here that mentioned you must use negative tags as once a post has been included in one collection it can’t be included in another. I’d also seen the negative tags mentioned somewhere in the help files but didn’t appreciate the significance that the index is a collection and therefore acquired all the tags before the collection had a chance to see it.

collections:
  /:
    permalink: /{slug}/
    template: index
    filter: tag:-fixedcontent
  /podcast/:
    permalink: /podcast/{slug}/
    template: podhome
    filter: primary_tag:fixedcontent

So for me at least, a more complete collections example in the help file would have been

collections:
  /:
    permalink: /{slug}/
    template: index
    filter: tag:-blog+tag:-podcast
   #I'm not sure if that's the correct way to chain tags in the filter, I only have once collection working!
  /blog/:
    permalink: /blog/{slug}/
    template: blog
    filter: primary_tag:blog
  /podcast/:
    permalink: /podcast/{slug}/
    template: podcast
    filter: primary_tag:podcast
2 Likes

My dude, thanks for posting this! haha I’ve been putting my head against the table for a couple hours now wondering why my collection wasn’t working. I think the documentation could be more clear how you described it. Was very simple after reading your take on it.

Cheers, I owe you a beer

I’m glad it helped!