I just started with Ghost. I am trying to create a subtopic or subpath? Essentially when I create a new post with the “daily-news” tag, I want to have that accessible only by https://www.domain.com/daily-news/{slug}
Collections are exclusive. A post can only be in one collection.
Posts are assigned to collections starting at the top of the list. In the original routes.yaml, all posts were assigned to the /: route, since there was no filter on it, so there were no posts for the /daily-news/: route. Switching the order allowed the daily-news route to take the daily-news-tagged posts.
Another solution would be to all filter: primary_tag:-[daily-news] to the /: route.
Two bonus tips:
Posts that aren’t assigned to any route don’t get a nice slug. They get a random-looking 32-character uuid, like yoursite/p/0bea5f67-880d-44c8-9ee7-9a19e6d4dfed. Always make sure your posts land on some route, if you want to be able to give them a human-readable slug. (This is a good argument for making the last route have no filter on it.)
If you ever want posts to show up in multiple places (perhaps you have daily-news that is also sports-news), check out channels. They’re not exclusive, so a post can belong to multiple channels. (Each one still needs to be in a collection so that it’ll get a nice url.)