{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/qgoda/latest.json",
  "title": "Configuration",
  "description": "A Qgoda Configuration",
  "x-lintel": {
    "source": "https://www.qgoda.net/schemas/qgoda.json",
    "sourceSha256": "b78e570fd303b85b43241e81a4f17870157ee502fce1f95bee48eca3c2032a3d",
    "fileMatch": [
      "_qgoda.yaml",
      "_qgoda.yml",
      "_qgoda.json",
      "_localqgoda.yaml",
      "_localqgoda.yml",
      "_localqgoda.json"
    ],
    "parsers": [
      "json",
      "yaml"
    ]
  },
  "type": "object",
  "properties": {
    "analyzers": {
      "default": [],
      "description": "Additional analyzers to run after the Qgoda standard analyzer.",
      "items": {
        "description": "Name of the analyzer without the leading Qgoda::Analyzer::",
        "type": "string"
      },
      "type": "array"
    },
    "build-task-timeout": {
      "default": 300,
      "description": "Number of seconds to wait before forcibly terminating pre-build or post-build tasks; defaults to 300 seconds.",
      "minimum": 1,
      "type": "number"
    },
    "case-sensitive": {
      "default": false,
      "description": "Set to true if a case-sensitive file system shoud be assumed.",
      "type": "boolean"
    },
    "compare-output": {
      "default": true,
      "description": "Should existing output files be read and compared to the new version to avoid updating timestamps (default => true)",
      "type": "boolean"
    },
    "defaults": {
      "default": [],
      "description": "Default values, see <http://www.qgoda.net/en/docs/defaults>",
      "items": {
        "type": "object",
        "description": "A list of objects with properties 'files' and 'values', default => empty",
        "properties": {
          "files": {
            "default": [],
            "description": "Either one single file name pattern or a list of file name patterns.  Files that match will receive the values specified.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "values": {
            "type": "object",
            "default": {},
            "description": "Values that should be set for matching files.",
            "additionalProperties": false,
            "patternProperties": {
              ".*": {}
            }
          }
        },
        "required": [
          "files",
          "values"
        ],
        "additionalProperties": false
      },
      "type": "array"
    },
    "exclude": {
      "default": [],
      "description": "List of additional file name patterns that should be ignored for building the site.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "exclude-watch": {
      "default": [],
      "description": "List of additional file name patterns that should be ignored when changed in watch mode.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "front-matter-placeholder": {
      "type": "object",
      "default": {
        "*": "[% '' %]\n"
      },
      "description": "An object of valid chain names or '*' that give the frontmatter placeholder string for each configured processor chain.",
      "additionalProperties": false,
      "patternProperties": {
        "(\\*|_[a-zA-Z][_a-zA-Z0-9]*)": {
          "type": "string"
        }
      }
    },
    "generator": {
      "default": "Qgoda vv0.11.0 (https://www.qgoda.net/)",
      "description": "Value for the generator meta tag in generated pages.",
      "type": "string"
    },
    "helpers": {
      "type": "object",
      "default": {},
      "description": "Key-value pairs of command identifiers and the command to run in parallel, when running in watch mode. Default: empty.",
      "additionalProperties": false,
      "patternProperties": {
        ".+": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      }
    },
    "index": {
      "default": "index",
      "description": "Basename of a file that is considered to be the index document of a directory.",
      "type": "string"
    },
    "latency": {
      "default": 0.5,
      "description": "Number of seconds to wait until a rebuild is triggered after a file system change in watch mode.",
      "minimum": 0,
      "type": "number"
    },
    "linguas": {
      "description": "List of language identifiers complying to RFC4647 section 2.1 but without any asterisk (*) characters.",
      "items": {
        "pattern": "[a-zA-Z]{1,8}(-[a-zA-z0-9]{8})?",
        "type": "string"
      },
      "type": "array"
    },
    "link-score": {
      "default": 5,
      "description": "By which value should two assets be considered more related if they link to to each other.",
      "minimum": 0,
      "type": "number"
    },
    "location": {
      "default": "/{directory}/{basename}/{index}{suffix}",
      "description": "Template string for the output location.",
      "type": "string"
    },
    "no-scm": {
      "default": [],
      "description": "List of additional file name patterns that should be processed in scm mode, even when not under version control",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "paths": {
      "type": "object",
      "default": {},
      "description": "Configurable paths.",
      "properties": {
        "plugins": {
          "default": "_plugins",
          "description": "Directory for plug-ins.",
          "type": "string"
        },
        "po": {
          "default": "_po",
          "description": "Directory for po files and other i18n related files.",
          "type": "string"
        },
        "site": {
          "default": "_site",
          "description": "Directory where to store rendered files, defaults to the absolute path to '_site' in the current directory.",
          "type": "string"
        },
        "timestamp": {
          "default": "_timestamp",
          "description": "Name of the timestamp file containing the seconds since the epoch since the last write of the site.",
          "type": "string"
        },
        "views": {
          "default": "_views",
          "description": "Directory where view templates are searched.",
          "type": "string"
        }
      },
      "required": [
        "plugins",
        "po",
        "site",
        "timestamp",
        "views"
      ],
      "additionalProperties": false
    },
    "permalink": {
      "default": "{significant-path}",
      "description": "Template string for permalinks.",
      "type": "string"
    },
    "po": {
      "type": "object",
      "default": {},
      "description": "Variables for internationalization (i18n) and the translation workflow.",
      "properties": {
        "copyright-holder": {
          "default": "Set config.po.copyright-holder in '_config.yaml'.",
          "description": "Copyright information for the original content.",
          "type": "string"
        },
        "mdextra": {
          "default": [],
          "description": "List of file name patterns for additional markdown files to translate.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "msgfmt": {
          "default": [
            "msgfmt"
          ],
          "description": "The 'msgfmt' command or an array of the program name plus arguments.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "msgid-bugs-address": {
          "default": "Set config.po.msgid-bugs-address in '_config.yaml'.",
          "description": "Where to report translation problems with the original strings.",
          "type": "string"
        },
        "msgmerge": {
          "default": [
            "msgmerge"
          ],
          "description": "The 'msgmerge' command(or an array of the program name plus arguments.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "qgoda": {
          "default": [
            "qgoda"
          ],
          "description": "The 'qgoda' command or an array of the program name plus arguments.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "reload": {
          "default": false,
          "description": "Whether to throw away the translation before every rebuild, defaults to false.",
          "type": "boolean"
        },
        "textdomain": {
          "default": "messages",
          "description": "An identifier for the translation catalog (textdomain), defaults to 'messages'.",
          "type": "string"
        },
        "tt2": {
          "default": [],
          "description": "A list of file name patterns or one single pattern, where translatable templates for the Template Toolkit version 2 are stored, defaults to '_views'.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "xgettext": {
          "default": [
            "xgettext"
          ],
          "description": "The 'xgettext' command or an array of the program name plus arguments.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "xgettext-tt2": {
          "default": [
            "xgettext-tt2"
          ],
          "description": "The 'xgettext-tt2' command or an array of the program name plus arguments.",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "additionalProperties": false
    },
    "post-build": {
      "#ref": "#/defs/buildTasks"
    },
    "post-processors": {
      "type": "object",
      "default": {
        "modules": [],
        "options": {}
      },
      "description": "Modules to run after each build.",
      "properties": {
        "modules": {
          "default": [],
          "description": "The post-processor modules.",
          "items": {
            "description": "Name of one post-processor module.",
            "pattern": "[_a-zA-Z][_a-zA-Z0-9]*(::[_a-zA-Z][_a-zA-Z0-9]*)*",
            "type": "string"
          },
          "type": "array"
        },
        "options": {
          "type": "object",
          "default": {},
          "description": "Additional options for the post-processor plug-ins",
          "additionalProperties": false,
          "patternProperties": {
            ".*": {}
          }
        }
      },
      "required": [
        "modules",
        "options"
      ],
      "additionalProperties": false
    },
    "pre-build": {
      "#ref": "#/defs/buildTasks"
    },
    "precious": {
      "default": [],
      "description": "List of file name patterns that should notbe deleted in the output directory.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "private": {
      "description": "Site-specific variables.  You can also choose the namespace 'site' if you prefer."
    },
    "processors": {
      "type": "object",
      "default": {},
      "description": "The processors to use for generating content.",
      "properties": {
        "chains": {
          "default": {
            "html": {
              "modules": [
                "TT2",
                "Strip",
                "HTMLFilter"
              ]
            },
            "markdown": {
              "modules": [
                "TT2",
                "Strip",
                "Markdown"
              ],
              "suffix": "html",
              "wrapper": "html"
            },
            "raw": {
              "modules": [
                "TT2",
                "Strip"
              ]
            },
            "xml": {
              "modules": [
                "TT2",
                "Strip"
              ]
            }
          },
          "description": "The processor chains.",
          "type": "object",
          "patternProperties": {
            "[_a-zA-Z][a-zA-Z0-9]*": {
              "type": "object",
              "description": "Properties of one processor chain.",
              "properties": {
                "modules": {
                  "description": "The module names.",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "suffix": {
                  "description": "An optional suffix if different from original filename.",
                  "type": "string"
                },
                "wrapper": {
                  "description": "An optional wrapper for a second run.",
                  "type": "string"
                }
              },
              "required": [
                "modules"
              ],
              "additionalProperties": false
            }
          }
        },
        "options": {
          "type": "object",
          "default": {
            "HTMLFilter": {
              "AnchorTarget": {},
              "CleanUp": {},
              "Generator": {},
              "TOC": {
                "content-tag": "qgoda-content",
                "end": 6,
                "start": 2,
                "template": "components/toc.html",
                "toc-tag": "qgoda-toc"
              }
            }
          },
          "description": "Additional options for the processor plug-ins",
          "additionalProperties": true
        },
        "triggers": {
          "default": {
            "htm": "html",
            "html": "html",
            "json": "raw",
            "md": "markdown",
            "mdown": "markdown",
            "mdwn": "markdown",
            "mkd": "markdown",
            "mkdn": "markdown",
            "xml": "raw"
          },
          "description": "Filename extenders that trigger a  particular chain if not specified in front matter or defaults.",
          "type": "object",
          "patternProperties": {
            ".+": {
              "description": "The filename extender.",
              "type": "string"
            }
          }
        }
      },
      "required": [
        "chains",
        "options",
        "triggers"
      ],
      "additionalProperties": false
    },
    "scm": {
      "const": "git",
      "description": "Source code management (SCM) that is in use. If present, only files that are under version control and those matching 'no-scm' are processed. Currently only git is supported.",
      "type": "string"
    },
    "site": {
      "description": "Site-specific variables.  You can also choose the namespace 'private' if you prefer."
    },
    "srcdir": {
      "default": ".",
      "description": "The source directory for all assets. Do not set that variable yourself! It will be overwritten at runtime with the absolute path to the current directory.",
      "readOnly": true,
      "type": "string"
    },
    "taxonomies": {
      "type": "object",
      "default": {
        "categories": 3,
        "links": 1,
        "tags": 2
      },
      "description": "Key/value pairs of taxonomy names and their respective weights for the computation of relatedness.",
      "additionalProperties": true,
      "patternProperties": {
        ".+": {
          "nullable": true,
          "type": "integer"
        }
      }
    },
    "title": {
      "default": "A new Qgoda Powered Site",
      "description": "The title of the site. It has no particular semantics.",
      "type": "string"
    },
    "track-dependencies": {
      "default": false,
      "description": "Set to true if you want to speed up watch mode by re-processing only assets that have changed or depend on changed files.",
      "type": "boolean"
    },
    "url": {
      "default": "Configure 'url' in _config.yaml!",
      "description": "The main url of the site.",
      "type": "string"
    },
    "view": {
      "default": "default.html",
      "description": "The default view template to use.",
      "minLength": 1,
      "type": "string"
    }
  },
  "$defs": {
    "buildTasks": {
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "description": "Task identifier for the logging.",
            "minLength": 1,
            "type": "string"
          },
          "run": {
            "description": "Either a complete command line or an array consisting of a command followed by an array of arguments.",
            "oneOf": [
              {
                "minLength": 1,
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            ]
          }
        },
        "required": [
          "name",
          "run"
        ],
        "additionalProperties": false
      },
      "type": "array"
    }
  },
  "additionalProperties": false
}
