Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sformisano/netlify-cms-widget-simple-uuid

A simple Netlify CMS widget to autogenerate IDs for collection items.
https://github.com/sformisano/netlify-cms-widget-simple-uuid

cms jam jamstack js netlify netlify-cms netlify-cms-widget netlify-cms-widget-id netlify-cms-widget-uuid node uuid

Last synced: about 2 months ago
JSON representation

A simple Netlify CMS widget to autogenerate IDs for collection items.

Awesome Lists containing this project

README

        

# Netlify CMS Widget Simple UUID

Instructions:

1) Install the widget:
```
npm i netlify-cms-widget-simple-uuid
```

2) Import the widget in your main netlify cms file:
```
import idWidget from 'netlify-cms-widget-simple-uuid';
```

3) Register the widget like this:

```
CMS.registerWidget('id', idWidget.Control, idWidget.Preview);
```

4) Add the id field to your collection like this (the collection here is just an example):

```
collections:
- name: "post"
label: "Post"
folder: "post"
create: true
slug: "{{slug}}"
fields:
- {label: "ID", name: "id", widget: "id"}
```

Enjoy!