Post routing questions

Greetings,

I’m migrating another site to Ghost but I’m having trouble figuring out post routing for the existing url structure.

The url structure I’m trying to mimic in ghost seems simple enough:

/{slug},
/press/{slug}

We also have pages like /{slug}.

My current routes file looks like this:

routes:
    /: 
        template: home
        data: page.home


collections:
    /press/:
        permalink: /press/{slug}/
        template: index
        data: tag.press
    /:
        permalink: /{slug}/
        template: page

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

The issue I’m having is that all post urls show up as /press/{slug}. I don’t understand how my non-press posts are getting the url /press/{slug} when they should be /{slug}. What am I doing wrong here?

Thanks for youth help.

You’re missing a filter property in your press collection (e.g. filter: tag:press) - think of your posts as a waterfall flowing down the collections. Each post is going to stop by every collection, and if it gets trapped by the filter, it stays, otherwise it moves on, until it eventually disappears (doesn’t get a URL). If a collection has no filter, it captures everything by default

Much appreciated for the help and explanation!