# publish_mode: editorial_workflow

backend:
  name: git-gateway
  repo: vbartalis/my-astro-blog # Path to your GitHub repository
  branch: master # Branch to update (optional; defaults to master)
  squash_merges: true
  commit_messages:
    create: "Create [{{collection}}] “{{slug}}”"
    update: "Update [{{collection}}] “{{slug}}”"
    delete: "Delete [{{collection}}] “{{slug}}”"
    uploadMedia: "Upload [skip ci] “{{path}}”"
    deleteMedia: "Delete [skip ci] “{{path}}”"

# The Media tab will only see the contents of the actual folder, the contents of the children folders will not be displayed
media_folder: "src/assets/images" # Location where files will be stored in the repo
public_folder: "@assets/images" # The src attribute for uploaded media
site_url: "https://vbartalis.xyz"
display_url: "https://vbartalis.xyz"

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_folders

  # Required - a list of locales to show in the editor UI
  locales: [en, hu]

  # Optional, defaults to the first item in locales.
  # The locale to be used for fields validation and as a baseline for the entry.
  default_locale: en

  # Optional, defaults to true.
  # Enforce required fields in non-default locales
  enforce_required_non_default: false

collections:
  - name: "posts"
    i18n: true # Enable localization
    label: "Blog Posts" # Used in the UI
    folder: "src/content/blog" # The path to the folder where the documents are stored
    media_library:
      config:
        max_file_size: 10485760 # 10MB in bytes
    media_folder: "/src/assets/images/blog" # Location where files will be stored in the repo
    public_folder: "@assets/images/blog" # The src attribute for uploaded media
    create: true # Allow users to create new documents in this collection
    delete: true # Allow users to delete documents in this collection
    fields: # The fields for each document, usually in frontmatter
      - label: "Post Title" # The label displayed in the UI
        key: "title" # The key for the field in the frontmatter
        name: "title" # The key for the field in the frontmatter
        widget: "string" # The widget type for the field
        i18n: true # Enable localization for this field
        required: true
      - label: "Description"
        key: "description"
        name: "description"
        widget: "string"
        i18n: true
      - label: "Publish Date"
        key: "pubDate"
        name: "pubDate"
        widget: "datetime"
        i18n: "duplicate"
      - label: "Image"
        key: "thumbnail"
        name: "thumbnail"
        widget: "image"
        i18n: "duplicate"
      - label: "ImageAlt"
        key: "thumbnailAlt"
        name: "thumbnailAlt"
        widget: "string"
        i18n: true
      - label: "Post Body"
        key: "body"
        name: "body"
        widget: "markdown"
        i18n: true
      - {
          label: "Youtube ID",
          key: "youtubeId",
          name: "youtubeId",
          widget: "string",
          i18n: "duplicate",
          required: false,
        }
  - name: deploy
    label: "Deploy"
    folder: "src/content/deploy"
    create: true
    fields:
      - label: "Deploy Title"
        key: "title"
        name: "title"
        widget: "string"
        required: true
      - label: "Deploy Description"
        key: "description"
        name: "description"
        widget: "string"
        # required: true
      - label: "Deploy Date"
        key: "deployDate"
        name: "deployDate"
        widget: "datetime"
        required: true
