Need help with making a /courses/ path

I’ve got this in my YAML file:

routes:

collections:
  /:
    permalink: /{slug}/
    template: index
   

  /courses/:
    permalink: /courses/{slug}/
    template: index 
    filter: primary_tag:courses

taxonomies:
  tag: /tag/{slug}/
  author: /author/{slug}/

When I make a new post and use the courses tag, it still ends up on the index page of my site.

I want all the courses posts to be on a new route e.g. example. com /courses/javascript-course

I have a /courses static page so not sure why it’s not working?

Thanks

Try swapping the order of your collections - since your first collection doesn’t have a filter, all posts are assigned there so the courses collection is never evaluated.

That works - thanks so much!!