Decap Netlify tips

Decap CMS formerly known as

Enable users to sign in with Github or external provider and create posts on phone without git commands

Decap Installation

Lets use jekyll Create two files

# admin/index.html
<!DOCTYPE html>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="robots" content="noindex" />
    <title>Content Manager</title>
    <!-- Include the script that builds the page and powers Decap CMS -->
    <script src="^3.0.0/dist/decap-cms.js"></script>


# admin/config.yml
  name: git-gateway
  branch: master

publish_mode: editorial_workflow

media_folder: "_images"
public_folder: "assets/images"

  - name: "blog"
    label: "Blog"
    folder: "_posts"
    create: true 
    slug: "---"
    # identifier_field: latin
      preview: false
      - {label: "Layout", name: "layout", widget: "hidden", default: "post"}
      - {label: "Title", name: "title", widget: "string"}
      - {label: "Latin", name: "latin", widget: "string", hint: 'Ovaj se koristi za URL posto ћирилица nije uobicajena za linkove. Kad se postavi, vise se ne moze promenuti'}
      - {label: "Publish Date", name: "date", widget: "datetime"}
      - {label: "Author", name: "author", widget: "select", options: ['vladan', 'slobodan', 'dragutin', 'darko', 'sreten', 'branislav']}
      - {label: "Body", name: "body", widget: "markdown"}

Enable backend on netlify

Enable in Site configuration > Identity (also External providers like Google) and set the Identity > Registration > Registration is invite only so you can invite users on note that Open users does not count to the free tier usage as seen on Also enable Site configuration > Identity > Services > Git Gateway

Error when I could not enable Identity and see this error message

{"code":400,"msg":"An instance with that UUID already exists"}

I solved by removing the site and adding the site again.

Error that you do not see all posts, probably the issue is in admin/config.yml on backend > branch . Make sure branch is the one you are using for the pages.

Error when working on locally and see window “Looks like you’re running a local server. Please let us know the URL of your Netlify site.” which appears briefly and then closes. Solution is to wait a few seconds (in console there is log “Manually initializing identity widget” and than click on “Login with Netlify Identity”. Note that when entering url, it will redirect, so you need to again enter in url.

Admin config

Collections Fields Widgets

When you do not see correct order when Sort by Publish Date than you do not have date: filled on each post. Solution is to add date: 2019-07-27T07:33:00.000Z that matches the filename, and again select sorting option.