{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://diplodoc.com/schemas/toc/draft-01/schema#",
  "title": "Diplodoc (toc.yaml)",
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "translate": "md",
      "markdownDescription": "**`string`** Title of the documentation section. Shown in the browser tab and the navigation sidebar header.",
      "description": "Title of the documentation section. Shown in the browser tab and sidebar header."
    },
    "llms": {
      "type": "object",
      "description": "LLMS metadata overrides for this TOC. Omitted fields fall back to .yfm.",
      "markdownDescription": "**`{description, details, url}`** Override LLMS metadata for this TOC. Each omitted field falls back to `.yfm`; an empty string clears its default. Included TOCs do not override the containing TOC metadata.",
      "properties": {
        "description": {
          "type": "string",
          "translate": "md",
          "description": "Short summary in the llms.txt header for this TOC.",
          "markdownDescription": "**`string`** Short summary in the `llms.txt` blockquote for this TOC."
        },
        "details": {
          "type": "string",
          "translate": "md",
          "description": "Additional Markdown details before the llms.txt link sections.",
          "markdownDescription": "**`string`** Additional Markdown paragraphs or lists after the summary and before the `llms.txt` link sections."
        },
        "url": {
          "type": "string",
          "anyOf": [
            {
              "format": "uri"
            },
            {
              "const": ""
            }
          ],
          "description": "Override the llms.txt describedby URL for pages in this TOC.",
          "markdownDescription": "**`string`** Override the `llms.txt` describedby URL for pages in this TOC. An empty string uses the generated URL when LLMS generation is enabled."
        }
      },
      "additionalProperties": false
    },
    "href": {
      "type": "string",
      "format": "url",
      "markdownDescription": "**`string`** Entry-point page for this TOC section. Relative path to a `.md` file or nested `index.yaml`.",
      "description": "Entry-point page for this TOC section (relative path to a .md or index.yaml file)."
    },
    "noIndex": {
      "type": "boolean",
      "markdownDescription": "**`boolean`** Exclude this TOC entry point and all descendant pages from search indexes and generated LLM indexes.",
      "description": "Exclude this TOC entry point and all descendant pages from indexes."
    },
    "stage": {
      "type": "string",
      "markdownDescription": "**`'new' | 'preview' | 'tech-preview' | 'skip'`** Publication stage controlling which builds include this entire section.",
      "description": "Publication stage: new | preview | tech-preview | skip.",
      "enum": ["new", "preview", "tech-preview", "skip"],
      "markdownEnumDescriptions": [
        "New section — visible only in **preview** builds. Excluded from production.",
        "Preview — visible in preview and tech-preview builds.",
        "Tech-preview — visible only in tech-preview builds.",
        "Excluded from **all** builds. The section is completely skipped."
      ]
    },
    "base": {
      "type": "string",
      "markdownDescription": "**`string`** Base path prefix prepended to all relative `href` values in this TOC. Useful when the same TOC is included from multiple places.",
      "description": "Base path prefix prepended to all relative hrefs in this TOC."
    },
    "singlePage": {
      "type": "boolean",
      "markdownDescription": "**`boolean`** Generate a single-page HTML variant that concatenates all TOC items into one scrollable page.",
      "description": "Generate a single-page HTML variant that combines all items into one page."
    },
    "label": {
      "oneOf": [
        {
          "type": "array",
          "items": {
            "$ref": "#/definitions/TocLabel"
          },
          "markdownDescription": "**`TocLabel[]`**"
        },
        {
          "$ref": "#/definitions/TocLabel"
        }
      ],
      "description": "Label badge(s) shown next to the TOC title in the sidebar.",
      "markdownDescription": "**`TocLabel | TocLabel[]`** Badge label(s) shown next to the section title in the navigation sidebar.\n\n```yaml\nlabel:\n  title: New\n  theme: info\n```",
      "defaultSnippets": [
        {
          "label": "Single label badge",
          "body": {
            "title": "${1:New}",
            "theme": "${2:info}"
          }
        },
        {
          "label": "Multiple label badges",
          "body": [
            {
              "title": "${1:New}",
              "theme": "${2:info}"
            },
            {
              "title": "${3:Beta}",
              "theme": "${4:warning}"
            }
          ]
        }
      ]
    },
    "when": {
      "type": ["string", "boolean"],
      "description": "Condition expression for including this TOC. Liquid expression (string) or boolean.",
      "markdownDescription": "**`string | boolean`** Condition for including this TOC in the build.\n\nUse Liquid-style expressions with variables from `presets.yaml`:\n```yaml\nwhen: env == 'production'\nwhen: feature_flag\nwhen: false  # always hidden\n```"
    },
    "analytics": {
      "$ref": "#/definitions/AnalyticsConfig",
      "description": "Analytics and cookie consent configuration.",
      "markdownDescription": "**`AnalyticsConfig`** Analytics tracking and cookie consent popup configuration.\n\n- `text` **`string`** — cookie consent popup text (HTML allowed)\n- `buttons` **`AnalyticsConfig`** — consent popup buttons (`accept`, `decline`)\n- `gtm` **`AnalyticsGtmConfig`** — Google Tag Manager configuration\n- `metrika` **`AnalyticsMetrikaConfig[]`** — Yandex Metrika counters",
      "defaultSnippets": [
        {
          "label": "Cookie consent",
          "body": {
            "text": "${1:We use cookies to improve your experience.}",
            "buttons": {
              "accept": {
                "text": "${2:Ok}",
                "theme": "${3:accent}",
                "size": "${4:xl}"
              }
            }
          }
        },
        {
          "label": "Analytics with GTM",
          "body": {
            "gtm": {
              "id": "${1:GTM-XXXXXXX}",
              "mode": "${2:base}"
            }
          }
        }
      ]
    },
    "navigation": {
      "oneOf": [
        {
          "type": "boolean",
          "markdownDescription": "**`boolean`**"
        },
        {
          "type": "string",
          "markdownDescription": "**`string`**"
        },
        {
          "$ref": "#/definitions/Navigation"
        }
      ],
      "description": "Top navigation bar configuration (logo + header items).",
      "markdownDescription": "**`boolean | string | Navigation`** Top navigation bar configuration.\n\n- `false` — disable the nav bar\n- `'...'` — path to a shared navigation YAML file\n- Object — inline navigation with `logo` and `header` fields",
      "defaultSnippets": [
        {
          "label": "Inline navigation",
          "body": {
            "logo": {
              "text": "${1:My Project}",
              "url": "${2:/}"
            },
            "header": {
              "leftItems": [],
              "rightItems": []
            }
          }
        }
      ]
    },
    "pdf": {
      "type": "object",
      "properties": {
        "startPages": {
          "type": "array",
          "items": {
            "type": "string",
            "markdownDescription": "**`string`**"
          },
          "markdownDescription": "**`string[]`** Paths to `.md` pages prepended at the beginning of the PDF output.",
          "description": "Pages prepended at the start of the PDF."
        },
        "endPages": {
          "type": "array",
          "items": {
            "type": "string",
            "markdownDescription": "**`string`**"
          },
          "markdownDescription": "**`string[]`** Paths to `.md` pages appended at the end of the PDF output.",
          "description": "Pages appended at the end of the PDF."
        }
      },
      "additionalProperties": false,
      "markdownDescription": "**`{startPages, endPages}`** PDF generation settings for this section.\n\n- `startPages` **`string[]`** — `.md` pages prepended at the beginning of the PDF\n- `endPages` **`string[]`** — `.md` pages appended at the end of the PDF",
      "description": "PDF generation config. Fields: startPages (string[]), endPages (string[])."
    },
    "items": {
      "$ref": "#/definitions/TocItems",
      "description": "List of TOC items (pages, sections, or includes).",
      "markdownDescription": "**`TocItem[]`** The navigation tree. Each item can be:\n- A **page** (has `href`)\n- A **section** (has `name` + nested `items`)\n- An **include** (has `include` with a `path`)",
      "defaultSnippets": [
        {
          "label": "Page item",
          "body": {
            "name": "${1:Page title}",
            "href": "${2:page.md}"
          }
        },
        {
          "label": "Section with children",
          "body": {
            "name": "${1:Section title}",
            "items": [
              {
                "name": "${2:First page}",
                "href": "${3:page.md}"
              }
            ]
          }
        },
        {
          "label": "Include from another TOC",
          "body": {
            "include": {
              "path": "${1:../other-section/toc.yaml}",
              "mode": "${2:link}"
            }
          }
        }
      ]
    }
  },
  "definitions": {
    "TocLabel": {
      "type": "object",
      "required": ["title"],
      "properties": {
        "title": {
          "type": "string",
          "translate": "md",
          "markdownDescription": "**`string`** Badge text (e.g. `New`, `Beta`, `Deprecated`). **Required.**",
          "description": "Label text displayed in the badge."
        },
        "description": {
          "type": "string",
          "translate": "md",
          "markdownDescription": "**`string`** Tooltip text shown when hovering over the badge.",
          "description": "Tooltip text shown on hover over the badge."
        },
        "theme": {
          "type": "string",
          "enum": ["normal", "info", "danger", "warning", "success", "utility", "unknown", "clear"],
          "markdownDescription": "**`string`** Visual color theme of the badge.",
          "description": "Visual theme of the badge: normal | info | danger | warning | success | utility | unknown | clear.",
          "markdownEnumDescriptions": [
            "Default neutral style.",
            "Blue — informational.",
            "Red — error / danger.",
            "Yellow — warning.",
            "Green — success / stable.",
            "Purple — utility.",
            "Grey — unknown status.",
            "Transparent background."
          ]
        },
        "when": {
          "type": ["string", "boolean"],
          "description": "Liquid condition expression. Badge is hidden when false.",
          "markdownDescription": "**`string | boolean`** Liquid condition — badge is hidden when the expression is falsy."
        }
      },
      "additionalProperties": false,
      "markdownDescription": "**`TocLabel`** Badge label shown next to a TOC title in the navigation sidebar.",
      "description": "Badge label shown next to a TOC entry in the sidebar."
    },
    "TocItems": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/TocItem"
      },
      "markdownDescription": "**`TocItem[]`**"
    },
    "TocItem": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "translate": "md",
          "markdownDescription": "**`string`** Display name in the navigation sidebar.",
          "description": "Display name of the item in the navigation sidebar."
        },
        "expanded": {
          "type": "boolean",
          "markdownDescription": "**`boolean`** Start this section expanded in the sidebar (`true`) or collapsed (`false`).",
          "description": "Whether this section starts expanded in the sidebar."
        },
        "labeled": {
          "type": "boolean",
          "markdownDescription": "**`boolean`** Propagate the label badge to all children of this section.",
          "description": "Show the label badge next to this item's children."
        },
        "hidden": {
          "type": "boolean",
          "markdownDescription": "**`boolean`** Hide this item in the sidebar. The page is still built and accessible by direct URL.",
          "description": "Exclude this item from the sidebar (but the page is still built)."
        },
        "noIndex": {
          "type": "boolean",
          "markdownDescription": "**`boolean`** Exclude this page and all descendant pages from search indexes and generated LLM indexes.",
          "description": "Exclude this page and all descendant pages from indexes."
        },
        "analyticsEvents": {
          "oneOf": [
            {
              "$ref": "#/definitions/AnalyticsEvent"
            },
            {
              "type": "array",
              "items": {
                "$ref": "#/definitions/AnalyticsEvent"
              },
              "markdownDescription": "**`AnalyticsEvent[]`**"
            }
          ]
        },
        "restricted-access": {
          "oneOf": [
            {
              "type": "string",
              "markdownDescription": "**`string`**"
            },
            {
              "type": "array",
              "items": {
                "type": "string",
                "markdownDescription": "**`string`**"
              },
              "markdownDescription": "**`string[]`**"
            }
          ],
          "description": "Access restriction rules. String or array of role/group conditions.",
          "markdownDescription": "**`string | string[]`** Access restriction conditions. The user must satisfy at least one condition to see this item."
        },
        "when": {
          "type": ["string", "boolean"],
          "description": "Liquid condition. Item is excluded when false.",
          "markdownDescription": "**`string | boolean`** Liquid condition — item is excluded from the build when the expression is falsy.\n\n```yaml\nwhen: env == 'internal'\n```"
        },
        "items": {
          "$ref": "#/definitions/TocItems"
        },
        "href": {
          "description": "Relative path to the target .md file or URL.",
          "markdownDescription": "**`string`** Relative path to the `.md` page or an external URL.",
          "type": "string"
        },
        "target": {
          "$ref": "#/definitions/NavigationLinkTarget"
        },
        "include": {
          "description": "Include directive to merge another toc.yaml.",
          "markdownDescription": "**`Include`** Directive to include another `toc.yaml` into this navigation tree.\n\n```yaml\n- include:\n    path: ../shared/toc.yaml\n    mode: merge # link | merge | root_merge\n```"
        }
      },
      "oneOf": [
        {
          "$ref": "#/definitions/TocItemWithLink"
        },
        {
          "$ref": "#/definitions/TocItemWithInclude"
        }
      ],
      "markdownDescription": "**`TocItem`** Navigation entry. Must be one of:\n- **Page** — has `href`\n- **Section** — has `items` (and optionally `name`)\n- **Include** — has `include`",
      "additionalProperties": false,
      "description": "A single navigation item — either a page link, a section, or a TOC include."
    },
    "TocItemWithLink": {
      "properties": {
        "name": {
          "type": "string",
          "translate": "md",
          "markdownDescription": "**`string`**"
        },
        "href": {
          "type": "string",
          "markdownDescription": "**`string`** Relative path to the `.md` page (e.g. `guide/intro.md`) or an external URL.",
          "description": "Relative path to the target .md file or URL."
        },
        "target": {
          "$ref": "#/definitions/NavigationLinkTarget"
        }
      },
      "not": {
        "required": ["include"]
      }
    },
    "TocItemWithInclude": {
      "required": ["include"],
      "properties": {
        "name": {
          "type": "string",
          "translate": "md",
          "markdownDescription": "**`string`**"
        },
        "include": {
          "$ref": "#/definitions/Include"
        }
      }
    },
    "Include": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": ["link", "merge", "root_merge"],
          "markdownDescription": "**`'link' | 'merge' | 'root_merge'`** How the included TOC is grafted into the current tree.",
          "description": "Inclusion mode: link | merge | root_merge.",
          "markdownEnumDescriptions": [
            "**link** — include as a subsection with its own root. The included TOC keeps its own `base` path.",
            "**merge** — merge items directly into the current level. Items inherit the current `base`.",
            "**root_merge** — merge items at the root of the TOC. Ignores nesting level."
          ]
        },
        "path": {
          "type": "string",
          "markdownDescription": "**`string`** Relative path to the `toc.yaml` file to include (e.g. `../shared/toc.yaml`).",
          "description": "Relative path to the toc.yaml to include."
        },
        "includers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Includer"
          },
          "markdownDescription": "**`Includer[]`** Plugins that process the included content before merging.\n\nCommon includers: `openapi`, `unarchive`.",
          "description": "List of includer plugins that transform the included content.",
          "defaultSnippets": [
            {
              "label": "OpenAPI includer",
              "body": [
                {
                  "name": "openapi",
                  "input": "${1:openapi.yaml}"
                }
              ]
            }
          ]
        }
      },
      "additionalProperties": false,
      "markdownDescription": "**`Include`** Directive to include another `toc.yaml` into this navigation tree.",
      "description": "Directive to include another toc.yaml file into this navigation tree."
    },
    "Includer": {
      "type": "object",
      "required": ["name"],
      "properties": {
        "name": {
          "type": "string",
          "markdownDescription": "**`string`**"
        }
      },
      "additionalProperties": true,
      "markdownDescription": "**`{name}`**"
    },
    "OpenApiIncluder": {
      "type": "object",
      "required": ["input"],
      "properties": {
        "input": {
          "type": "string",
          "markdownDescription": "**`string`**"
        },
        "filter": {
          "$ref": "#/definitions/OpenApiIncluderFilter"
        },
        "noindex": {
          "$ref": "#/definitions/OpenApiIncluderFilter"
        },
        "hidden": {
          "$ref": "#/definitions/OpenApiIncluderFilter"
        },
        "sandbox": {
          "type": "object",
          "properties": {
            "tabName": {
              "type": "string",
              "translate": "text",
              "markdownDescription": "**`string`**"
            },
            "host": {
              "type": "string",
              "format": "url",
              "markdownDescription": "**`string`**"
            }
          },
          "markdownDescription": "**`{tabName, host}`**"
        },
        "leadingPage": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "markdownDescription": "**`string`**"
            },
            "mode": {
              "type": "string",
              "enum": ["section", "leaf"],
              "markdownDescription": "**`'section' | 'leaf'`**"
            },
            "spec": {
              "type": "object",
              "properties": {
                "renderMode": {
                  "type": "string",
                  "enum": ["inline", "hidden", "link"],
                  "markdownDescription": "**`'inline' | 'hidden' | 'link'`**"
                }
              },
              "markdownDescription": "**`{renderMode}`**"
            }
          },
          "markdownDescription": "**`{name, mode, spec}`**"
        },
        "tags": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/OpenApiCustomTag"
          }
        }
      },
      "markdownDescription": "**`{input, filter, noindex, ...}`**"
    },
    "OpenApiCustomTag": {
      "type": "object",
      "properties": {
        "hidden": {
          "type": "boolean",
          "markdownDescription": "**`boolean`**"
        },
        "name": {
          "type": "string",
          "markdownDescription": "**`string`**"
        },
        "path": {
          "type": "string",
          "markdownDescription": "**`string`**"
        },
        "alias": {
          "type": "string",
          "markdownDescription": "**`string`**"
        }
      },
      "additionalProperties": false,
      "markdownDescription": "**`{hidden, name, path, alias}`**"
    },
    "OpenApiIncluderFilter": {
      "type": "object",
      "properties": {
        "endpoint": {
          "type": "string",
          "markdownDescription": "**`string`**"
        },
        "tag": {
          "type": "string",
          "markdownDescription": "**`string`**"
        }
      },
      "markdownDescription": "**`{endpoint, tag}`**"
    },
    "Navigation": {
      "type": "object",
      "properties": {
        "logo": {
          "$ref": "#/definitions/NavigationLogo",
          "description": "Logo shown in the top-left of the navigation bar.",
          "markdownDescription": "**`NavigationLogo`** Logo shown in the top-left corner of the navigation bar.\n\n- `text` — text label\n- `url` — click destination URL\n- `icon` — image URL\n- `dark` / `light` — theme-specific variants"
        },
        "header": {
          "$ref": "#/definitions/NavigationHeader",
          "description": "Header navigation items. Fields: leftItems (NavigationItem[]), rightItems (NavigationItem[]), iconSize (number).",
          "markdownDescription": "**`NavigationHeader`** Header navigation items.\n\n- `leftItems` **`NavigationItem[]`** — items shown on the left\n- `rightItems` **`NavigationItem[]`** — items shown on the right\n- `iconSize` **`number`** — default icon size in pixels"
        },
        "footer": {
          "$ref": "#/definitions/NavigationFooter",
          "description": "Footer navigation. Fields: withDivider, view, moreButtonTitle, copyright, logo, menuItems.",
          "markdownDescription": "**`NavigationFooter`** Page footer configuration.\n\n- `withDivider` **`boolean`** — show top border\n- `view` **`'normal' | 'clear'`** — footer style\n- `moreButtonTitle` **`string`** — expand button text\n- `copyright` **`string`** — copyright text\n- `logo` **`string | NavigationLogo`** — footer logo\n- `menuItems` **`NavigationFooterMenuItem[]`** — footer links"
        }
      },
      "markdownDescription": "**`Navigation`** Top navigation bar layout.\n\n- `logo` **`NavigationLogo`** — logo in the top-left corner\n- `header` **`NavigationHeader`** — left/right header link groups\n- `footer` **`NavigationFooter`** — page footer",
      "description": "Top nav bar config. Fields: logo (NavigationLogo), header (NavigationHeader), footer (NavigationFooter)."
    },
    "NavigationLogo": {
      "type": "object",
      "properties": {
        "text": {
          "type": "string",
          "markdownDescription": "**`string`** Text label shown next to (or instead of) the logo image."
        },
        "url": {
          "type": "string",
          "format": "url",
          "markdownDescription": "**`string`** URL the logo links to when clicked."
        },
        "urlTitle": {
          "type": "string",
          "translate": "md",
          "markdownDescription": "**`string`** Accessible title for the logo link (tooltip / screen-reader text)."
        },
        "icon": {
          "type": "string",
          "format": "url",
          "markdownDescription": "**`string`** Logo image URL."
        },
        "dark": {
          "$ref": "#/definitions/NavigationLogo",
          "markdownDescription": "**`NavigationLogo`** Logo variant for dark theme — overrides the root logo fields."
        },
        "light": {
          "$ref": "#/definitions/NavigationLogo",
          "markdownDescription": "**`NavigationLogo`** Logo variant for light theme — overrides the root logo fields."
        }
      },
      "markdownDescription": "**`NavigationLogo`** Navigation bar logo configuration.\n\n- `text` **`string`** — text label (shown when no image)\n- `url` **`string`** — click destination URL\n- `urlTitle` **`string`** — accessible title / tooltip\n- `icon` **`string`** — image URL\n- `dark` **`NavigationLogo`** — dark-theme variant\n- `light` **`NavigationLogo`** — light-theme variant",
      "description": "Navigation bar logo. Fields: text, url, urlTitle, icon, dark (NavigationLogo), light (NavigationLogo)."
    },
    "NavigationHeader": {
      "type": "object",
      "properties": {
        "leftItems": {
          "$ref": "#/definitions/NavigationItems",
          "description": "Navigation items shown on the left side of the header.",
          "markdownDescription": "**`NavigationItem[]`** Navigation items shown on the **left** side of the header bar."
        },
        "rightItems": {
          "$ref": "#/definitions/NavigationItems",
          "description": "Navigation items shown on the right side of the header.",
          "markdownDescription": "**`NavigationItem[]`** Navigation items shown on the **right** side of the header bar."
        },
        "iconSize": {
          "type": "number",
          "markdownDescription": "**`number`** Default icon size in pixels for header item icons.",
          "description": "Default icon size in pixels for all header items."
        }
      },
      "markdownDescription": "**`NavigationHeader`** Navigation header item groups.\n\n- `leftItems` **`NavigationItem[]`** — items shown on the left side\n- `rightItems` **`NavigationItem[]`** — items shown on the right side\n- `iconSize` **`number`** — default icon size in pixels",
      "description": "Navigation header. Fields: leftItems (NavigationItem[]), rightItems (NavigationItem[]), iconSize (number)."
    },
    "NavigationFooter": {
      "type": "object",
      "properties": {
        "withDivider": {
          "type": "boolean",
          "markdownDescription": "**`boolean`** Show a top border above the footer.",
          "description": "Show a horizontal divider above the footer."
        },
        "view": {
          "type": "string",
          "enum": ["normal", "clear"],
          "markdownDescription": "**`'normal' | 'clear'`** Footer style. `normal` — white background with all items. `clear` — transparent, copyright only.",
          "description": "Footer visual style: normal (full) or clear (copyright only)."
        },
        "moreButtonTitle": {
          "type": "string",
          "translate": "md",
          "markdownDescription": "**`string`** Button text to expand collapsed menu items.",
          "description": "Title of the button that shows more menu items."
        },
        "copyright": {
          "type": "string",
          "translate": "md",
          "markdownDescription": "**`string`** Copyright text shown in the footer.",
          "description": "Copyright text."
        },
        "logo": {
          "oneOf": [
            {
              "type": "string",
              "format": "url"
            },
            {
              "$ref": "#/definitions/NavigationLogo"
            }
          ],
          "markdownDescription": "**`string | NavigationLogo`** Footer logo — either a URL string or a full NavigationLogo object.",
          "description": "Footer logo (URL or NavigationLogo object)."
        },
        "logoWrapperClassName": {
          "type": "string",
          "markdownDescription": "**`string`** CSS class name for the logo wrapper element.",
          "description": "CSS class for the logo container."
        },
        "menuItems": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/NavigationFooterMenuItem"
          },
          "markdownDescription": "**`NavigationFooterMenuItem[]`** Links displayed in the footer.",
          "description": "Footer menu links."
        }
      },
      "markdownDescription": "**`NavigationFooter`** Page footer configuration.\n\n- `withDivider` **`boolean`** — show top border\n- `view` **`'normal' | 'clear'`** — footer style\n- `moreButtonTitle` **`string`** — expand button label\n- `copyright` **`string`** — copyright text\n- `logo` **`string | NavigationLogo`** — logo\n- `menuItems` **`NavigationFooterMenuItem[]`** — links",
      "description": "Page footer config. Fields: withDivider, view, moreButtonTitle, copyright, logo, logoWrapperClassName, menuItems."
    },
    "NavigationFooterMenuItem": {
      "type": "object",
      "properties": {
        "text": {
          "type": "string",
          "translate": "md",
          "markdownDescription": "**`string`** Link display text.",
          "description": "Menu item display text."
        },
        "url": {
          "type": "string",
          "format": "url",
          "markdownDescription": "**`string`** Link destination URL.",
          "description": "Menu item URL."
        },
        "target": {
          "type": "string",
          "enum": ["_self", "_blank", "_parent", "_top"],
          "markdownDescription": "**`'_self' | '_blank' | '_parent' | '_top'`** Standard HTML link target attribute.",
          "description": "Link target: _self (same tab), _blank (new tab), _parent, _top."
        }
      },
      "markdownDescription": "**`NavigationFooterMenuItem`** A single footer menu link.\n\n- `text` **`string`** — displayed text\n- `url` **`string`** — link destination\n- `target` **`'_self' | '_blank' | '_parent' | '_top'`** — window target",
      "description": "Footer menu item. Fields: text, url, target."
    },
    "NavigationItems": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/NavigationItem"
      },
      "markdownDescription": "**`NavigationItem[]`**"
    },
    "NavigationItem": {
      "type": "object",
      "required": ["type"],
      "properties": {
        "type": {
          "type": "string",
          "markdownDescription": "**`'link' | 'button' | 'dropdown' | 'controls'`** Item variant. **Required.**",
          "description": "Item type: link | button | dropdown | controls."
        }
      },
      "allOf": [
        {
          "$ref": "#/definitions/NavigationBaseItem"
        },
        {
          "oneOf": [
            {
              "$ref": "#/definitions/NavigationLinkItem"
            },
            {
              "$ref": "#/definitions/NavigationButtonItem"
            },
            {
              "$ref": "#/definitions/NavigationDropdownItem"
            },
            {
              "$ref": "#/definitions/NavigationControlsItem"
            }
          ]
        }
      ],
      "markdownDescription": "**`NavigationItem`** A navigation header item. The `type` field determines the variant:\n- `link` — text link (requires `text`, `url`)\n- `button` — CTA button (requires `text`, `url`)\n- `dropdown` — dropdown menu (requires `items`)\n- `controls` — theme/language switcher",
      "description": "Navigation header item. type field determines variant: link | button | dropdown | controls."
    },
    "NavigationBaseItem": {
      "type": "object",
      "properties": {
        "text": {
          "type": "string",
          "translate": "md",
          "markdownDescription": "**`string`** Label text displayed for this navigation item."
        },
        "url": {
          "type": "string",
          "format": "url",
          "markdownDescription": "**`string`** Link destination URL."
        },
        "icon": {
          "type": "string",
          "format": "url",
          "markdownDescription": "**`string`** Icon image URL displayed next to the text."
        },
        "iconSize": {
          "type": "number",
          "markdownDescription": "**`number`** Icon size in pixels (overrides the header-level `iconSize`)."
        },
        "when": {
          "type": ["string", "boolean"],
          "markdownDescription": "**`string | boolean`** Liquid visibility condition — item is hidden when falsy."
        }
      },
      "markdownDescription": "**`NavigationBaseItem`** Shared fields for all navigation item types.\n\n- `text` **`string`** — label text\n- `url` **`string`** — link URL\n- `icon` **`string`** — icon image URL\n- `iconSize` **`number`** — icon size in pixels\n- `when` **`string | boolean`** — visibility condition",
      "description": "Base navigation item fields: text, url, icon, iconSize, when."
    },
    "NavigationLinkItem": {
      "type": "object",
      "properties": {
        "text": {
          "type": "string",
          "translate": "md",
          "markdownDescription": "**`string`**"
        },
        "type": {
          "type": "string",
          "pattern": "^link$",
          "markdownDescription": "**`string`**"
        },
        "target": {
          "$ref": "#/definitions/NavigationLinkTarget"
        },
        "arrow": {
          "type": "boolean",
          "markdownDescription": "**`boolean`**"
        }
      },
      "required": ["type", "text"],
      "markdownDescription": "**`{text, type, target, arrow}`**"
    },
    "NavigationButtonItem": {
      "properties": {
        "type": {
          "type": "string",
          "pattern": "^button$",
          "markdownDescription": "**`string`**"
        },
        "urlTitle": {
          "type": "string",
          "translate": "md",
          "markdownDescription": "**`string`**"
        },
        "primary": {
          "type": "boolean",
          "markdownDescription": "**`boolean`**"
        },
        "size": {
          "type": "string",
          "markdownDescription": "**`string`**"
        },
        "theme": {
          "type": "string",
          "markdownDescription": "**`string`**"
        },
        "img": {
          "oneOf": [
            {
              "type": "string",
              "markdownDescription": "**`string`**"
            },
            {
              "type": "object",
              "required": ["data"],
              "properties": {
                "data": {
                  "type": "string",
                  "markdownDescription": "**`string`**"
                },
                "position": {
                  "type": "string",
                  "enum": ["left", "right"],
                  "markdownDescription": "**`'left' | 'right'`**"
                },
                "alt": {
                  "type": "string",
                  "translate": "md",
                  "markdownDescription": "**`string`**"
                }
              },
              "markdownDescription": "**`{data, position, alt}`**"
            }
          ]
        },
        "analyticsEvents": {
          "oneOf": [
            {
              "$ref": "#/definitions/AnalyticsEvent"
            },
            {
              "type": "array",
              "items": {
                "$ref": "#/definitions/AnalyticsEvent"
              },
              "markdownDescription": "**`AnalyticsEvent[]`**"
            }
          ]
        },
        "target": {
          "$ref": "#/definitions/NavigationLinkTarget"
        },
        "width": {
          "type": "string",
          "enum": ["auto", "max"],
          "markdownDescription": "**`'auto' | 'max'`**"
        }
      },
      "required": ["type", "text", "url"]
    },
    "NavigationDropdownItem": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "pattern": "^dropdown$",
          "markdownDescription": "**`string`**"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/NavigationLinkItem"
          },
          "markdownDescription": "**`NavigationLinkItem[]`**"
        }
      },
      "required": ["type", "items"],
      "markdownDescription": "**`{type, items}`**"
    },
    "NavigationControlsItem": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "pattern": "^controls$",
          "markdownDescription": "**`string`**"
        }
      },
      "required": ["type"],
      "markdownDescription": "**`{type}`**"
    },
    "NavigationLinkTarget": {
      "type": "string",
      "enum": ["_self", "_blank", "_parent", "_top"],
      "markdownDescription": "**`string`** HTML link target attribute.",
      "description": "Link target: _self | _blank | _parent | _top.",
      "markdownEnumDescriptions": [
        "Open in the same frame (default).",
        "Open in a new tab.",
        "Open in the parent frame.",
        "Open in the full window."
      ]
    },
    "AnalyticsConfig": {
      "description": "Analytics and cookie consent configuration.",
      "type": "object",
      "properties": {
        "text": {
          "type": "string",
          "translate": "md",
          "description": "Cookie consent popup text (HTML allowed).",
          "markdownDescription": "**`string`** Text displayed in the cookie consent popup. HTML tags are allowed (e.g. `<a>` links to privacy policy)."
        },
        "buttons": {
          "$ref": "#/definitions/AnalyticsButtons",
          "description": "Cookie consent popup buttons.",
          "markdownDescription": "**`AnalyticsButtons`** Button configuration for the cookie consent popup.\n\n- `accept` — accept all cookies button\n- `decline` — decline optional cookies button"
        },
        "gtm": {
          "$ref": "#/definitions/AnalyticsGtmConfig",
          "description": "Google Tag Manager configuration.",
          "markdownDescription": "**`AnalyticsGtmConfig`** Google Tag Manager configuration.\n\n- `id` **`string`** — GTM container ID (e.g. `GTM-XXXXXXX`)\n- `mode` **`'base' | 'notification'`** — consent mode"
        },
        "metrika": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/AnalyticsMetrikaConfig"
          },
          "markdownDescription": "**`AnalyticsMetrikaConfig[]`** Array of Yandex Metrika counter configurations.",
          "description": "Yandex Metrika counter configurations."
        }
      },
      "additionalProperties": false,
      "markdownDescription": "**`AnalyticsConfig`** Analytics tracking and cookie consent popup configuration.\n\n- `text` **`string`** — consent popup text (HTML allowed)\n- `buttons` **`AnalyticsButtons`** — popup button configuration\n- `gtm` **`AnalyticsGtmConfig`** — Google Tag Manager\n- `metrika` **`AnalyticsMetrikaConfig[]`** — Yandex Metrika counters"
    },
    "AnalyticsButtons": {
      "description": "Cookie consent popup buttons.",
      "type": "object",
      "properties": {
        "accept": {
          "$ref": "#/definitions/AnalyticsButton",
          "description": "Accept button configuration.",
          "markdownDescription": "**`AnalyticsButton`** Accept all cookies button."
        },
        "decline": {
          "$ref": "#/definitions/AnalyticsButton",
          "description": "Decline button configuration.",
          "markdownDescription": "**`AnalyticsButton`** Decline optional cookies button."
        }
      },
      "additionalProperties": false,
      "markdownDescription": "**`AnalyticsButtons`** Cookie consent popup button configuration."
    },
    "AnalyticsButton": {
      "description": "Cookie consent button.",
      "type": "object",
      "properties": {
        "text": {
          "type": "string",
          "translate": "md",
          "markdownDescription": "**`string`** Button label text.",
          "description": "Button label text."
        },
        "theme": {
          "type": "string",
          "markdownDescription": "**`string`** Button visual theme (Gravity UI theme, e.g. `accent`, `normal`, `outlined`).",
          "description": "Button visual theme (e.g. accent, normal)."
        },
        "size": {
          "type": "string",
          "markdownDescription": "**`string`** Button size (`s`, `m`, `l`, `xl`).",
          "description": "Button size (e.g. s, m, l, xl)."
        }
      },
      "additionalProperties": false,
      "markdownDescription": "**`AnalyticsButton`** A cookie consent popup button."
    },
    "AnalyticsGtmConfig": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "markdownDescription": "**`string`** GTM container ID (e.g. `GTM-XXXXXXX`).",
          "description": "GTM container ID."
        },
        "mode": {
          "type": "string",
          "enum": ["base", "notification"],
          "markdownDescription": "**`'base' | 'notification'`** Consent integration mode.\n\n- `base` — default consent mode with full popup\n- `notification` — notification-style consent banner",
          "description": "Consent mode: base | notification.",
          "markdownEnumDescriptions": [
            "Default consent mode with full popup.",
            "Notification-style consent banner."
          ]
        }
      },
      "markdownDescription": "**`AnalyticsGtmConfig`** Google Tag Manager configuration.",
      "description": "Google Tag Manager configuration."
    },
    "AnalyticsMetrikaConfig": {
      "type": "object",
      "additionalProperties": false,
      "required": ["id"],
      "properties": {
        "id": {
          "type": "integer",
          "markdownDescription": "**`number`** Yandex Metrika counter ID. **Required.**",
          "description": "Yandex Metrika counter ID."
        },
        "params": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "accurateTrackBounce": {
              "type": ["boolean", "number"]
            },
            "childIframe": {
              "type": "boolean",
              "markdownDescription": "**`boolean`**"
            },
            "clickmap": {
              "type": "boolean",
              "markdownDescription": "**`boolean`**"
            },
            "defer": {
              "type": "boolean",
              "markdownDescription": "**`boolean`**"
            },
            "ecommerce": {
              "oneOf": [
                {
                  "type": "boolean",
                  "markdownDescription": "**`boolean`**"
                },
                {
                  "type": "string",
                  "markdownDescription": "**`string`**"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "markdownDescription": "**`string`**"
                  },
                  "markdownDescription": "**`string[]`**"
                }
              ]
            },
            "trackHash": {
              "type": "boolean",
              "markdownDescription": "**`boolean`**"
            },
            "trackLinks": {
              "type": "boolean",
              "markdownDescription": "**`boolean`**"
            },
            "trustedDomains": {
              "type": "array",
              "items": {
                "type": "string",
                "markdownDescription": "**`string`**"
              },
              "markdownDescription": "**`string[]`**"
            },
            "webvisor": {
              "type": "boolean",
              "markdownDescription": "**`boolean`**"
            },
            "triggerEvent": {
              "type": "boolean",
              "markdownDescription": "**`boolean`**"
            },
            "sendTitle": {
              "type": "boolean",
              "markdownDescription": "**`boolean`**"
            },
            "ssr": {
              "type": "boolean",
              "markdownDescription": "**`boolean`**"
            }
          },
          "markdownDescription": "**`{accurateTrackBounce, childIframe, clickmap, ...}`** Yandex Metrika initialization parameters (webvisor, clickmap, trackLinks, etc.).",
          "description": "Yandex Metrika initialization parameters."
        }
      },
      "markdownDescription": "**`AnalyticsMetrikaConfig`** Yandex Metrika counter configuration.\n\n- `id` **`number`** — counter ID (**required**)\n- `params` **`{id, params}`** — initialization parameters",
      "description": "Yandex Metrika counter configuration."
    },
    "AnalyticsEvent": {
      "type": "object",
      "required": ["name"],
      "properties": {
        "name": {
          "type": "string",
          "markdownDescription": "**`string`**"
        },
        "type": {
          "type": "string",
          "markdownDescription": "**`string`**"
        },
        "counters": {
          "type": "object",
          "properties": {
            "include": {
              "type": "array",
              "items": {
                "type": "string",
                "markdownDescription": "**`string`**"
              },
              "markdownDescription": "**`string[]`**"
            },
            "exclude": {
              "type": "array",
              "items": {
                "type": "string",
                "markdownDescription": "**`string`**"
              },
              "markdownDescription": "**`string[]`**"
            }
          },
          "markdownDescription": "**`{include, exclude}`**"
        },
        "context": {
          "type": "string",
          "markdownDescription": "**`string`**"
        },
        "target": {
          "type": "string",
          "markdownDescription": "**`string`**"
        }
      },
      "markdownDescription": "**`{name, type, counters, ...}`**"
    },
    "NavigationAnalyticsEvent": {
      "description": "Analytics event. Fields: name (string, required), type (string), counters (object), context (string).",
      "markdownDescription": "**`NavigationAnalyticsEvent`** Analytics event attached to a navigation item click.\n\n- `name` **`string`** — event name (**required**)\n- `type` **`string`** — event type\n- `counters` **`object`** — counter filter (`include: string[]`, `exclude: string[]`)\n- `context` **`string`** — event context string",
      "properties": {
        "name": {
          "description": "Analytics event name. Required.",
          "markdownDescription": "**`string`** Analytics event name. **Required.**"
        },
        "type": {
          "description": "Analytics event type.",
          "markdownDescription": "**`string`** Analytics event type identifier."
        },
        "counters": {
          "description": "Counter filter. Fields: include (string[]), exclude (string[]).",
          "markdownDescription": "**`object`** Counter filter for this event.\n\n- `include` **`string[]`** — counter IDs to include\n- `exclude` **`string[]`** — counter IDs to exclude"
        },
        "context": {
          "description": "Event context string.",
          "markdownDescription": "**`string`** Event context string passed with the analytics event."
        }
      }
    }
  },
  "markdownDescription": "Diplodoc table-of-contents file (`toc.yaml`).\nDefines the structure, navigation hierarchy, and metadata of a documentation section.\n```yaml title: My Docs href: index.yaml items:\n  - name: Getting started\n    href: quickstart.md\n  - name: Reference\n    items:\n      - name: API\n        href: api.md\n```",
  "additionalProperties": false
}
