decaporg / decaporg/decap-cms

Limit the amount of posts that can be made in a single folder collection

Open
#6,203 0 comments 0 reactions 0 assignees View on GitHub
type: feature
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

The usage of uuids has been a long discussed topic for Netlify CMS.

Now, an issue came up when using UUIDS in combination with a `Homepage` collection.
When the `slug` is the `uuid`, you cannot use a single file collection...

Because the uuid is used in combination with Netlify's FaunaDB integration (in multiple sites),
every homepage that is created, needs to have a unique `uuid` `slug`.

I'm developing a site template using Netlify CMS, which will become a Github Template Repository.
So whenever a new site is cloned from this template, and then deployed to Netlify a new homepage has to be created by the user, which will then have a unique `uuid` `slug`.

Since we cannot use a single file collection, as we don't know the uuid beforehand, we need to use a folder collection.
But there can only be 1 homepage, it would be great if there was an option like `max_entries` or `max_files` after which the `New Homepage` button will be disabled to prevent endusers from creating multiple homepages.

Not sure if this use case warrants a feature request, I thought it might :)
Otherwise I'd be happy for pointers how I could achieve this otherwise.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.