Problem
When one collection uses the root index.md and another uses a prefixed index.md, Studio collapses both back to the same filesystem path.
Reproduction
Minimal repro:
onmax/repros/tree/main/nuxt-studio-index-collision
Expected
marketing/index.md resolves to index.md
guides/guides/index.md resolves to guides/index.md
getCollectionByFilePath('index.md') resolves marketing
Actual
marketing/index.md -> marketing/index.md -> index.md
guides/guides/index.md -> guides/guides/index.md -> index.md
getCollectionByFilePath('index.md') -> guides
This makes the prefixed collection win when Studio tries to recover a collection from index.md.
Problem
When one collection uses the root
index.mdand another uses a prefixedindex.md, Studio collapses both back to the same filesystem path.Reproduction
Minimal repro:
onmax/repros/tree/main/nuxt-studio-index-collision
pnpm i && pnpm diagnoseExpected
marketing/index.mdresolves toindex.mdguides/guides/index.mdresolves toguides/index.mdgetCollectionByFilePath('index.md')resolvesmarketingActual
This makes the prefixed collection win when Studio tries to recover a collection from
index.md.