{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "/comment/waline.json",
  "description": "Waline comment plugin configurations",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "waline"
    },
    "server_url": {
      "type": "string",
      "description": "Waline server address url."
    },
    "path": {
      "type": "string",
      "description": "Article path id."
    },
    "lang": {
      "type": "string",
      "description": "Display language.",
      "enum": ["zh", "zh-CN", "zh-TW", "en", "en-US", "jp", "jp-JP", "pt-BR", "ru", "ru-RU"],
      "default": "zh-CN",
      "nullable": true
    },
    "locale": {
      "type": "object",
      "description": "I18n configurations",
      "nullable": true
    },
    "emoji": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "string"
          },
          {
            "type": "object",
            "description": "Emoji set configuration.",
            "properties": {
              "name": {
                "type": "string",
                "description": "Emoji name on the tab."
              },
              "folder": {
                "type": "string",
                "description": "Image folder link."
              },
              "prefix": {
                "type": "string",
                "description": "The general prefix of images' filename."
              },
              "type": {
                "type": "string",
                "description": "Type of the picture, which will be used as file extension."
              },
              "icon": {
                "type": "string",
                "description": "Filename of the icon image used in tab (requirement is the same as items)."
              },
              "items": {
                "type": "array",
                "description": "Each item is the picture filename without common prefix (do not include file extension).",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": ["name", "folder"]
          }
        ]
      },
      "description": "Emoji settings.",
      "default": ["//unpkg.com/@waline/emojis@1.0.1/weibo"],
      "nullable": true
    },
    "dark": {
      "type": ["string", "boolean"],
      "description": "Darkmode support.",
      "nullable": true
    },
    "meta": {
      "type": "array",
      "description": "Reviewer attributes.",
      "items": {
        "type": "string"
      },
      "default": ["nick", "mail", "link"],
      "nullable": true
    },
    "required_meta": {
      "type": "array",
      "description": "Required commenter information fields.",
      "default": [],
      "nullable": true
    },
    "login": {
      "type": "string",
      "description": "Login mode status.",
      "enum": ["enable", "disable", "force"],
      "default": "enable",
      "nullable": true
    },
    "word_limit": {
      "oneOf": [
        {
          "type": "number",
          "minimum": 0,
          "nullable": true
        },
        {
          "type": "array",
          "minItems": 2,
          "maxItems": 2,
          "items": {
            "type": "number",
            "minimum": 0
          },
          "nullable": true
        }
      ],
      "description": "Comment word s limit. When a single number is filled in, it 's the maximum number of comment words. No limit when set to 0.",
      "default": 0
    },
    "page_size": {
      "type": "number",
      "description": "Number of comments per page.",
      "default": 10,
      "nullable": true
    },
    "image_uploader": {
      "type": "boolean",
      "description": "Whether to disable the image upload feature.",
      "default": false,
      "nullable": true
    },
    "highlighter": {
      "type": "boolean",
      "description": "Whether to disable the code highlight feature.",
      "default": false,
      "nullable": true
    },
    "tex_renderer": {
      "type": "boolean",
      "description": "Whether to disable TeX rendering.",
      "default": false,
      "nullable": true
    },
    "search": {
      "type": "boolean",
      "description": "Whether to disable the search feature.",
      "default": false,
      "nullable": true
    },
    "pageview": {
      "type": ["string", "boolean"],
      "description": "Whether to show page view count. It can also be a CSS selector to page view count container.",
      "default": false,
      "nullable": true
    },
    "comment": {
      "type": ["string", "boolean"],
      "description": "Whether to show comment count. It can also be a CSS selector to comment count container.",
      "default": false,
      "nullable": true
    },
    "copyright": {
      "type": "boolean",
      "description": "Whether show copyright and version in footer.",
      "default": true,
      "nullable": true
    }
  },
  "required": ["type", "server_url"]
}
