{
  "$id": "https://json.schemastore.org/netlify.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "definitions": {
    "collectionItems": {
      "properties": {
        "fields": {
          "$ref": "#/definitions/fields"
        },
        "label": {
          "description": "label for the collection in the editor UI; defaults to the value of name",
          "type": "string"
        },
        "label_singular": {
          "description": "singular label for certain elements in the editor; defaults to the value of label"
        },
        "folder": {
          "description": "Folder collections represent one or more files with the same format, fields, and configuration options, all stored within the same folder in the repository. \nNote: Folder collections must have at least one field with the name title for creating new entry slugs. That field should use the default string widget. The label for the field can be any string value. If you wish to use a different field as your identifier, set identifier_field to the field name. See the Collections reference doc for details on how collections and fields are configured. If you forget to add this field, you will get an error that your collection \"must have a field that is a valid entry identifier\".",
          "type": "string"
        },
        "files": {
          "$ref": "#/definitions/files"
        },
        "path": {
          "description": "Path",
          "type": "string"
        },
        "format": {
          "description": "determines how collection files are parsed and saved. It will be inferred if the extension field or existing collection file extensions match one of the supported extensions.",
          "type": "string",
          "enum": [
            "yml",
            "yaml",
            "toml",
            "json",
            "frontmatter",
            "yaml-frontmatter",
            "toml-frontmatter",
            "json-frontmatter"
          ]
        },
        "slug": {
          "description": "For folder collections where users can create new items, the slug option specifies a template for generating new filenames based on a file's creation date and title field. (This means that all collections with create: true must have a title field (a different field can be used via identifier_field)).\n \nAny field can be referenced by wrapping the field name in double curly braces, eg. {{author}} \n{{slug}}: a url-safe version of the title field (or identifier field) for the file \n{{year}}: 4-digit year of the file creation date \n{{month}}: 2-digit month of the file creation date \n{{day}}: 2-digit day of the month of the file creation date \n{{hour}}: 2-digit hour of the file creation date \n{{minute}}: 2-digit minute of the file creation date \n{{second}}: 2-digit second of the file creation date",
          "type": "string"
        },
        "create": {
          "description": "for folder collections only; allows users to create new items in the collection",
          "type": "boolean",
          "default": false
        },
        "hide": {
          "description": "hides a collection in the CMS UI; defaults to false. Useful when using the relation widget to hide referenced collections.",
          "type": "boolean",
          "default": false
        },
        "delete": {
          "description": "prevents users from deleting items in a collection; defaults to true",
          "type": "boolean",
          "default": true
        },
        "name": {
          "description": "unique identifier for the collection, used as the key when referenced in other contexts",
          "type": "string"
        },
        "filter": {
          "description": "optional filter for folder collections"
        },
        "description": {
          "description": "optional text, displayed below the label when viewing a collection",
          "type": "string"
        },
        "extension": {
          "description": "the file extension searched for when finding existing entries in a folder collection and it determines the file extension used to save new collection items",
          "type": "string"
        }
      },
      "required": ["name"],
      "oneOf": [
        {
          "required": ["files"]
        },
        {
          "required": ["folder"]
        }
      ]
    },
    "fields": {
      "type": "array",
      "description": "The fields option maps editor UI widgets to field-value pairs in the saved file. The order of the fields in your Netlify CMS config.yml file determines their order in the editor UI and in the saved file.",
      "items": {
        "properties": {
          "name": {
            "type": "string",
            "description": "unique identifier for the field, used as the key when referenced in other contexts (like the relation widget)"
          },
          "label": {
            "type": "string",
            "description": "label for the field in the editor UI; defaults to the value of name"
          },
          "widget": {
            "$ref": "#/definitions/widget"
          },
          "default": {
            "description": "specify a default value for a field; available for most widget types. Please note that field default value only works for folder collection type."
          },
          "required": {
            "type": "boolean",
            "default": true,
            "description": "makes a field required; defaults to true"
          },
          "pattern": {
            "type": "array",
            "description": "add field validation by specifying a list with a regex pattern and an error message (first entry in array is regex pattern, second is the error message)"
          },
          "fields": {
            "$ref": "#/definitions/fields"
          }
        },
        "required": ["name"]
      }
    },
    "widget": {
      "properties": {
        "required": {
          "type": "boolean",
          "description": "Defaults to True"
        },
        "hint": {
          "description": "optionally add helper text directly below a widget.",
          "type": "string"
        },
        "pattern": {
          "description": "add field validation by specifying a list with a regex pattern and an error message; more extensive validation can be achieved with custom widgets",
          "type": "array"
        }
      }
    },
    "files": {
      "type": "array",
      "items": {
        "properties": {
          "name": {
            "description": "unique identifier for the file",
            "type": "string"
          },
          "label": {
            "description": "file label",
            "type": "string"
          },
          "file": {
            "description": "unique filepath (relative to the base of the repo).",
            "type": "string"
          },
          "fields": {
            "$ref": "#/definitions/fields"
          }
        }
      }
    }
  },
  "dependencies": {},
  "description": "Config file for Netlify CMS",
  "properties": {
    "backend": {
      "type": "object",
      "description": "specifies how to access the content for your site, including authentication"
    },
    "local_backend": {
      "type": "boolean",
      "description": "Set this property to connect Netlify to a local Git repo instead of a live one"
    },
    "publish_mode": {},
    "media_folder": {
      "type": "string",
      "description": "specifies the folder path where uploaded files should be saved, relative to the base of the repo."
    },
    "public_folder": {
      "type": "string",
      "description": "specifies the folder path where the files uploaded by the media library will be accessed, relative to the base of the built site. For fields controlled by [file] or [image] widgets, the value of the field is generated by prepending this path to the filename of the selected file. Defaults to the value of media_folder, with an opening / if one is not already included."
    },
    "media_library": {
      "description": "Media library integrations are configured via the media_library property, and its value should be an object with at least a name property. A config property can also be used for options that should be passed to the library in use.",
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "config": {
          "type": "object"
        }
      },
      "required": ["name"]
    },
    "site_url": {
      "description": "should provide a URL to your published site. May be used by the CMS for various functionality. Used together with a collection's preview_path to create links to live content.",
      "type": "string"
    },
    "display_url": {
      "description": "When the display_url setting is specified, the CMS UI will include a link in the fixed area at the top of the page, allowing content authors to easily return to your main site. The text of the link consists of the URL without the protocol portion (e.g., your-site.com).\nDefaults to site_url.",
      "type": "string"
    },
    "logo_url": {
      "type": "string",
      "description": "Logo at the top of the login page. Assumed to be a URL to an image file"
    },
    "locale": {
      "type": "string",
      "default": "en"
    },
    "show_preview_links": {
      "description": "shows Deploy Preview Links",
      "type": "boolean"
    },
    "slug": {
      "type": "object",
      "description": "For folder collections where users can create new items, the slug option specifies a template for generating new filenames based on a file's creation date and title field. (This means that all collections with create: true must have a title field (a different field can be used via identifier_field).\n \nThe slug template can also reference a field value by name, eg. {{title}}. If a field name conflicts with a built in template tag name - for example, if you have a field named slug, and would like to reference that field via {{slug}}, you can do so by adding the explicit fields. prefix, eg. {{fields.slug}}.\n \nAvailable template tags:\n \nAny field can be referenced by wrapping the field name in double curly braces, eg. {{author}} \n{{slug}}: a url-safe version of the title field (or identifier field) for the file \n{{year}}: 4-digit year of the file creation date \n{{month}}: 2-digit month of the file creation date \n{{day}}: 2-digit day of the month of the file creation date \n{{hour}}: 2-digit hour of the file creation date \n{{minute}}: 2-digit minute of the file creation date \n{{second}}: 2-digit second of the file creation date",
      "properties": {
        "encoding": {
          "description": "\nunicode (default): Sanitize filenames (slugs) according to RFC3987 and the WHATWG URL spec. This spec allows non-ASCII (or non-Latin) characters to exist in URLs.\nascii: Sanitize filenames (slugs) according to RFC3986. The only allowed characters are (0-9, a-z, A-Z, _, -, ~).",
          "enum": ["unicode", "ascii"],
          "default": "unicode"
        },
        "clean_accents": {
          "type": "boolean",
          "description": "Remove diacritics from slug characters before sanitizing. This is often helpful when using ascii encoding."
        },
        "sanitize_replacement": {
          "type": "string",
          "description": "The replacement string used to substitute unsafe characters; defaults to -"
        }
      }
    },
    "collections": {
      "description": "The collections setting is the heart of your Netlify CMS configuration, as it determines how content types and editor fields in the UI generate files and content in your repository. Each collection you configure displays in the left sidebar of the Content page of the editor UI, in the order they are entered into your Netlify CMS config.yml file.",
      "type": "array",
      "items": {
        "$ref": "#/definitions/collectionItems"
      }
    },
    "editor": {
      "description": "This setting changes options for the editor view of the collection. It has one option so far: preview",
      "type": "object",
      "properties": {
        "preview": {
          "type": "boolean",
          "description": "Enable preview pane for this collection; defaults to true",
          "default": true
        }
      }
    },
    "summary": {
      "description": "This setting allows the customization of the collection list view. Similar to the slug field, a string with templates can be used to include values of different fields, e.g. {{title}}. This option over-rides the default of title field and identifier_field\nTemplate tags are the same as those for slug, with the following additions: \n\n \n{{filename}} The file name without the extension part. \n{{extension}} The file extension. \n{{commit_date}} The file commit date on supported backends (git based backends). \n{{commit_author}} The file author date on supported backends (git based backends).",
      "type": "string"
    },
    "sortableFields": {
      "type": "array",
      "description": "An optional list of sort fields to show in the UI.\nDefaults to inferring title, date, author and description fields and will also show Update On sort field in git based backends.\nWhen author field can't be inferred commit author will be used."
    },
    "view_filters": {
      "type": "array",
      "description": "An optional list of predefined view filters to show in the UI.\nDefaults to an empty list."
    }
  },
  "required": ["backend", "media_folder", "collections"],
  "title": "Netlify config schema",
  "type": "object"
}