Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/sformisano/netlify-cms-widget-simple-uuid
- Owner: sformisano
- Created: 2019-11-04T21:33:29.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-26T13:56:33.000Z (almost 2 years ago)
- Last Synced: 2023-02-26T12:22:39.620Z (almost 2 years ago)
- Topics: cms, jam, jamstack, js, netlify, netlify-cms, netlify-cms-widget, netlify-cms-widget-id, netlify-cms-widget-uuid, node, uuid
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 10
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
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!