{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://splitleaf.eu/schema/config.v3.json",
  "title": "Splitleaf site config",
  "description": "Configuration options for a site build with Splitleaf",
  "type": "object",
  "properties": {
    "$schema": {
      "type": "string"
    },
    "id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9-]{8,64}$"
    },
    "name": {
      "type": "string"
    },
    "workspaceId": {
      "type": [
        "string",
        "null"
      ]
    },
    "pages": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "minLength": 1,
            "pattern": "^(?!\\/)(?!.*(^|\\/)\\.\\.(\\/|$))[^\\0]+$"
          },
          "name": {
            "type": "string"
          },
          "translations": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "required": [
          "path"
        ],
        "additionalProperties": {}
      }
    },
    "settings": {
      "type": "object",
      "properties": {
        "siteUrl": {
          "type": "string"
        },
        "head": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string"
            }
          },
          "additionalProperties": {}
        },
        "body": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string"
            }
          },
          "additionalProperties": {}
        },
        "fonts": {
          "type": "object",
          "properties": {
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "family": {
                    "type": "string"
                  }
                },
                "additionalProperties": {}
              }
            },
            "tokens": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "additionalProperties": {}
              }
            }
          },
          "additionalProperties": {}
        },
        "canonical": {
          "type": "object",
          "properties": {
            "trailingSlash": {
              "type": "boolean"
            }
          },
          "additionalProperties": {}
        },
        "redirects": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string"
              },
              "to": {
                "type": "string"
              },
              "status": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "force": {
                "type": "boolean"
              }
            },
            "required": [
              "from",
              "to"
            ],
            "additionalProperties": {}
          }
        },
        "robots": {
          "type": "object",
          "properties": {
            "rules": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "userAgent": {
                    "type": "string"
                  },
                  "allow": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "disallow": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": {}
              }
            },
            "sitemap": {
              "type": "string"
            }
          },
          "additionalProperties": {}
        },
        "llms": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "sections": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  }
                },
                "additionalProperties": {}
              }
            }
          },
          "additionalProperties": {}
        },
        "sitemap": {
          "type": "object",
          "properties": {
            "excludePatterns": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "additionalProperties": {}
        },
        "images": {
          "type": "object",
          "properties": {
            "compress": {
              "type": "boolean"
            },
            "quality": {
              "type": "number"
            },
            "maxWidth": {
              "type": "number"
            }
          },
          "additionalProperties": {}
        },
        "favicon": {
          "type": "object",
          "properties": {
            "source": {
              "type": "string"
            },
            "dark": {
              "type": "string"
            },
            "hasSvg": {
              "type": "boolean"
            },
            "hasDark": {
              "type": "boolean"
            },
            "updatedAt": {
              "type": "number"
            }
          },
          "additionalProperties": {}
        },
        "indexNow": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          },
          "additionalProperties": {}
        },
        "i18n": {
          "type": "object",
          "properties": {
            "locales": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "defaultLocale": {
              "type": "string"
            },
            "prefixDefaultLocale": {
              "type": "boolean"
            },
            "autoRedirect": {
              "type": "string"
            },
            "localeMap": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "bcp47": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  }
                },
                "additionalProperties": {}
              }
            },
            "translationGuidelines": {
              "type": "string"
            }
          },
          "additionalProperties": {}
        }
      },
      "additionalProperties": {}
    },
    "integrations": {
      "type": "object",
      "properties": {
        "git": {
          "type": "object",
          "properties": {
            "provider": {
              "type": "string"
            },
            "connected": {
              "type": "boolean"
            },
            "owner": {
              "type": [
                "string",
                "null"
              ]
            },
            "repo": {
              "type": [
                "string",
                "null"
              ]
            },
            "repoUrl": {
              "type": [
                "string",
                "null"
              ]
            },
            "defaultBranch": {
              "type": "string"
            },
            "remote": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "additionalProperties": {}
        },
        "deploy": {
          "type": "object",
          "properties": {
            "target": {
              "type": [
                "string",
                "null"
              ]
            },
            "connected": {
              "type": "boolean"
            },
            "accountId": {
              "type": [
                "string",
                "null"
              ]
            },
            "accountName": {
              "type": [
                "string",
                "null"
              ]
            },
            "projectId": {
              "type": [
                "string",
                "null"
              ]
            },
            "projectName": {
              "type": [
                "string",
                "null"
              ]
            },
            "productionUrl": {
              "type": [
                "string",
                "null"
              ]
            },
            "publishDir": {
              "type": "string"
            },
            "buildCommand": {
              "type": [
                "string",
                "null"
              ]
            },
            "distBranch": {
              "type": [
                "string",
                "null"
              ]
            },
            "customDomains": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "host": {
                    "type": "string"
                  }
                },
                "additionalProperties": {}
              }
            },
            "stagingBranch": {
              "type": "string"
            },
            "stagingUrl": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "additionalProperties": {}
        }
      },
      "additionalProperties": {}
    }
  },
  "required": [
    "pages"
  ],
  "additionalProperties": {}
}
