{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "/comment/valine.json",
  "description": "Valine comment plugin configurations",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "valine"
    },
    "app_id": {
      "type": "string",
      "description": "Application <APP_ID> from Leancloud"
    },
    "app_key": {
      "type": "string",
      "description": "Application <APP_KEY> from Leancloud"
    },
    "placeholder": {
      "type": "string",
      "description": "Comment box placeholders",
      "nullable": true
    },
    "avatar": {
      "type": "string",
      "description": "Gravatar type",
      "enum": ["", "mp", "identicon", "monsterid", "wavatar", "robohash", "retro", "hide", "mm"],
      "default": "mm",
      "nullable": true
    },
    "avatar_force": {
      "type": "boolean",
      "description": "Pull the latest avatar upon page visit",
      "default": false,
      "nullable": true
    },
    "meta": {
      "type": "array",
      "description": "Reviewer attributes",
      "items": {
        "type": "string"
      },
      "default": ["nick", "mail", "link"],
      "nullable": true
    },
    "page_size": {
      "type": "integer",
      "description": "Number of comments per page",
      "default": 10,
      "nullable": true
    },
    "lang": {
      "type": "string",
      "description": "i18n support",
      "default": "zh-CN",
      "nullable": true
    },
    "visitor": {
      "type": "boolean",
      "description": "Show visitor count",
      "default": false,
      "nullable": true
    },
    "highlight": {
      "type": "boolean",
      "description": "Enable code highlighting",
      "default": true,
      "nullable": true
    },
    "record_ip": {
      "type": "boolean",
      "description": "Record reviewer IP address",
      "default": false,
      "nullable": true
    },
    "server_urls": {
      "type": "string",
      "description": "Root URL of your custom domain",
      "nullable": true
    },
    "emoji_cdn": {
      "type": "string",
      "description": "CDN URL of the Emoji provider",
      "nullable": true
    },
    "emoji_maps": {
      "type": "object",
      "description": "Mappings between emoji and its CDN file name",
      "nullable": true
    },
    "enable_qq": {
      "type": "boolean",
      "description": "Enable QQ nickname and avatar",
      "default": false,
      "nullable": true
    },
    "required_fields": {
      "type": "array",
      "description": "Required commenter information fields",
      "default": [],
      "nullable": true
    }
  },
  "required": ["type", "app_id", "app_key"]
}
