$schema: https://json-schema.org/draft/2020-12/schema

additionalProperties: false
properties:
  permalink: { type: string }
  title: { type: string }
  toc_title: { type: string }
  toc_collapse: { type: boolean }

  items:
    type: array
    minItems: 1
    uniqueItems: true
    items:
      oneOf:
        - type: string

        - type: object
          minProperties: 1
          maxProperties: 1
          patternProperties:
            .+:
              oneOf:
                - type: string

                - type: object
                  additionalProperties: false
                  properties:
                    permalink: { type: string }
                    title: { type: string }
                    toc_title: { type: string }
                    toc_collapse: { type: boolean }