Skip to content

sformisano/netlify-cms-widget-simple-uuid

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

Netlify CMS Widget Simple UUID

Instructions:

  1. Install the widget:
npm i netlify-cms-widget-simple-uuid
  1. Import the widget in your main netlify cms file:
import idWidget from 'netlify-cms-widget-simple-uuid';
  1. Register the widget like this:
CMS.registerWidget('id', idWidget.Control, idWidget.Preview);
  1. 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!

Releases

No releases published

Packages

No packages published