question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Folder collections path does not resolve collisions in {{slug}} section

See original GitHub issue

Posting here at the suggestion from the chat.

NetlifyCMS resolves regular filename collisions by appending a numeric index, e.g.

/entries/concert.md
/entries/concert-1.md   # different concert, fine
/entries/concert-2.md   # ditto

Folder collections

I’m using the folder collections path BETA feature like so: {{slug}}/index. The intent is to have a page bundle (as is common in some SSGs), i.e. one folder per page, usually with related page media inside.

The problem I noticed is that filename collisions get resolved as above (not surprising):

/soccer-tournament/index.md
/soccer-tournament/index-1.md
/soccer-tournament/index-2.md
/soccer-tournament/lineups.jpg
/soccer-tournament/tickets.json

Whereas the user would want collisions to be resolved at the folder/slug level:

/soccer-tournament/index.md
/soccer-tournament/lineups.jpg
/soccer-tournament/tickets.json

/soccer-tournament-1/index.md   # different soccer tournament
/soccer-tournament-2/index.md   # …

I hope that makes sense.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
KancerEzeroglucommented, Sep 28, 2020

Does someone work on that? If not, I would like to work on it.

0reactions
KancerEzeroglucommented, Oct 15, 2020

I agree, but I can’t close 😃 fyi

Read more comments on GitHub >

github_iconTop Results From Across the Web

1078699 - Resources are accessible by slug - Bugzilla@Mozilla
Currently, the API does not allow slugs to be modified, because they are a promise to API users of where data is located....
Read more >
167 Creative uses of the Slug area - InDesign Tutorial - LinkedIn
The point of using a Slug guide is that anything that I put in InDesign in this paste board area bounded by the...
Read more >
Path Collision trying to Export Collection - MongoDB
I'm using Compass and I'm able to view collections, query the data, etc. Everything is working fine. When I try to export a...
Read more >
Nested Collections - Dynamic Path/Slug - Netlify CMS
Otherwise, the path field has to be manually exposed, and the user has to type in the folder name manually – which can...
Read more >
Descriptor Format of Catalog Entities - Backstage.io
The root fields apiVersion , kind , metadata , and spec are part of the ... A generic fallback icon would be provided...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found