---
backend:
  name: gitlab
  repo: fshn/fshn-website # Path to your GitLab repository
  auth_type: pkce # Required for pkce
  app_id: b479f0566373e811e83743adc55837b66fa2e3be28e14fe7ef4e88fd617cd1ab # Application ID from your GitLab settings
  api_root: https://git.fs.tum.de/api/v4
  base_url: https://git.fs.tum.de
  auth_endpoint: oauth/authorize
  branch: main
  use_large_media_transforms_in_media_library: false
media_folder: assets/images
public_folder: /images
site_url: https://hn.fs.tum.de/
i18n:
  # Required and can be one of multiple_folders, multiple_files or single_file
  # multiple_folders - persists files in `<folder>/<locale>/<slug>.<extension>`
  # multiple_files - persists files in `<folder>/<slug>.<locale>.<extension>`
  # single_file - persists a single file in `<folder>/<slug>.<extension>`
  structure: multiple_files
  locales:
    - de
    - en
  default_locale: de
collections:
  - name: news
    label: news
    folder: content/news
    create: true
    nested:
      depth: 100 # max depth to show in the collection tree
      summary: '{{year}}' # optional summary for a tree node, defaults to the inferred title field
    path: '{{year}}/{{slug}}'
    sortable_fields:
      fields: [ 'commit_date', 'title', 'commit_author' ]
      default:
        field: commit_date
        direction: Descending
    view_groups:
      groups:
      - name: year
        label: Year
        field: date
        pattern: \d{4} # groups items based on the year
    media_folder: ../../assets/images/news/{{year}}
    public_folder: /images/news/{{year}}
    slug: '{{slug}}'
    i18n: true
    fields:
      - name: contributors
        label: Contributors
        label_singular: Contributor
        widget: list
        forSingleList: true
        default:
          - Frank Elsinga
        min: 1
        fields:
          - name: contributor
            label: Contributor
            widget: string
      - label: Title
        name: title
        widget: string
        i18n: true
      - label: Publish Date
        name: date
        widget: datetime
      - name: images
        label: Featured Images
        label_singular: Featured Image
        hint: The images will be displayed as 1270x715, so uploading a larger image is not necessary. (Doing so would only slow down the build)
        widget: list
        forSingleList: true
        summary: '{{fields.image}}'
        fields:
          - name: image
            label: Image
            widget: image
      - label: Description
        name: description
        widget: string
        i18n: true
      - label: Body
        name: body
        widget: markdown
        i18n: true

  - name: events
    label: events
    folder: content/events
    create: true
    nested:
      depth: 100 # max depth to show in the collection tree
      summary: '{{title}}' # optional summary for a tree node, defaults to the inferred title field
    media_folder: ../../assets/images/events
    public_folder: /images/events
    slug: '{{slug}}'
    i18n: true
    fields:
      - name: contributors
        label: Contributors
        label_singular: Contributor
        widget: list
        forSingleList: true
        default:
          - Frank Elsinga
        min: 1
        fields:
          - name: contributor
            label: Contributor
            widget: string
      - label: Title
        name: title
        widget: string
        i18n: true
      - label: Publish Date
        name: date
        widget: datetime
      - name: images
        label: Featured Images
        label_singular: Featured Image
        hint: The images will be displayed as 1270x715, so uploading a larger image is not necessary. (Doing so would only slow down the build)
        widget: list
        forSingleList: true
        summary: '{{fields.image}}'
        fields:
          - name: image
            label: Image
            widget: image
      - label: Description
        name: description
        widget: string
        i18n: true
      - label: Body
        name: body
        widget: markdown
        i18n: true

  - name: fachschaft
    label: fachschaft
    folder: content/fachschaft
    create: true
    nested:
      depth: 100 # max depth to show in the collection tree
      summary: '{{title}}' # optional summary for a tree node, defaults to the inferred title field
    media_folder: ../../assets/images/fachschaft
    public_folder: /images/fachschaft
    slug: '{{slug}}'
    i18n: true
    fields:
      - name: contributors
        label: Contributors
        label_singular: Contributor
        widget: list
        forSingleList: true
        default:
          - Frank Elsinga
        min: 1
        fields:
          - name: contributor
            label: Contributor
            widget: string
      - label: Title
        name: title
        widget: string
        i18n: true
      - label: Publish Date
        name: date
        widget: datetime
      - name: images
        label: Featured Images
        label_singular: Featured Image
        hint: The images will be displayed as 1270x715, so uploading a larger image is not necessary. (Doing so would only slow down the build)
        widget: list
        forSingleList: true
        summary: '{{fields.image}}'
        fields:
          - name: image
            label: Image
            widget: image
      - label: Description
        name: description
        widget: string
        i18n: true
      - label: Body
        name: body
        widget: markdown
        i18n: true

  - name: kontakt
    label: kontakt
    folder: content/kontakt
    create: true
    nested:
      depth: 100 # max depth to show in the collection tree
      summary: '{{title}}' # optional summary for a tree node, defaults to the inferred title field
    media_folder: ../../assets/images/kontakt
    public_folder: /images/kontakt
    slug: '{{slug}}'
    i18n: true
    fields:
      - name: contributors
        label: Contributors
        label_singular: Contributor
        widget: list
        forSingleList: true
        default:
          - Frank Elsinga
        min: 1
        fields:
          - name: contributor
            label: Contributor
            widget: string
      - label: Title
        name: title
        widget: string
        i18n: true
      - label: Publish Date
        name: date
        widget: datetime
      - name: images
        label: Featured Images
        label_singular: Featured Image
        hint: The images will be displayed as 1270x715, so uploading a larger image is not necessary. (Doing so would only slow down the build)
        widget: list
        forSingleList: true
        summary: '{{fields.image}}'
        fields:
          - name: image
            label: Image
            widget: image
      - label: Description
        name: description
        widget: string
        i18n: true
      - label: Body
        name: body
        widget: markdown
        i18n: true

  - name: services
    label: services
    folder: content/services
    create: true
    nested:
      depth: 100 # max depth to show in the collection tree
      summary: '{{title}}' # optional summary for a tree node, defaults to the inferred title field
    media_folder: ../../assets/images/services
    public_folder: /images/services
    slug: '{{slug}}'
    i18n: true
    fields:
      - name: contributors
        label: Contributors
        label_singular: Contributor
        widget: list
        forSingleList: true
        default:
          - Frank Elsinga
        min: 1
        fields:
          - name: contributor
            label: Contributor
            widget: string
      - label: Title
        name: title
        widget: string
        i18n: true
      - label: Publish Date
        name: date
        widget: datetime
      - name: images
        label: Featured Images
        label_singular: Featured Image
        hint: The images will be displayed as 1270x715, so uploading a larger image is not necessary. (Doing so would only slow down the build)
        widget: list
        forSingleList: true
        summary: '{{fields.image}}'
        fields:
          - name: image
            label: Image
            widget: image
      - label: Description
        name: description
        widget: string
        i18n: true
      - label: Body
        name: body
        widget: markdown
        i18n: true

  - name: studium
    label: studium
    folder: content/studium
    create: true
    nested:
      depth: 100 # max depth to show in the collection tree
      summary: '{{title}}' # optional summary for a tree node, defaults to the inferred title field
    media_folder: ../../assets/images/studium
    public_folder: /images/studium
    slug: '{{slug}}'
    i18n: true
    fields:
      - name: contributors
        label: Contributors
        label_singular: Contributor
        widget: list
        forSingleList: true
        default:
          - Frank Elsinga
        min: 1
        fields:
          - name: contributor
            label: Contributor
            widget: string
      - label: Title
        name: title
        widget: string
        i18n: true
      - label: Publish Date
        name: date
        widget: datetime
      - name: images
        label: Featured Images
        label_singular: Featured Image
        hint: The images will be displayed as 1270x715, so uploading a larger image is not necessary. (Doing so would only slow down the build)
        widget: list
        forSingleList: true
        summary: '{{fields.image}}'
        fields:
          - name: image
            label: Image
            widget: image
      - label: Description
        name: description
        widget: string
        i18n: true
      - label: Body
        name: body
        widget: markdown
        i18n: true
