#Pathless routes for index

1 messages · Page 1 of 1 (latest)

gentle peak
#

I am trying to achieve something similar to the Pathless Layout Routes in the docs but for the index route.

I have 2 routes:

_index // I’m using this to get my site specific data and return html for the header, navigation and an outlet for the page content.

_index.($slug) // Depending on the optional slug, this is meant to get and display the page specific content in the outlet.

However I’m getting: Error: Index routes must not have child routes. Please remove all child routes from route path "/".

I’ve structured routing for other parts of the site in a similar fashion without a problem. Any ideas welcomed.

#

I can remove the _index route and just have everything load and route through _index.($slug), but that seems like it misses the point of using remix.