backend:
  name: github
  repo: stebo71/robertoabbadati
  branch: main

media_folder: "site/static/uploads"
public_folder: "/uploads"

editor:
  preview: false

collections:
  # 1. Articoli del Blog (Tutti i 21 articoli, eventi, video e scritti)
  - name: "posts"
    label: "Articoli del Blog"
    label_singular: "Articolo"
    folder: "site/content/posts"
    create: true
    slug: "{{slug}}"
    sortable_fields: ["date", "title"]
    default_sort: { field: "date", direction: "descending" }
    editor:
      preview: false
    fields:
      - { label: "Titolo", name: "title", widget: "string" }
      - { label: "Data Pubblicazione", name: "date", widget: "datetime" }
      - { label: "Bozza (se attivo, nasconde l'articolo dal sito)", name: "draft", widget: "boolean", default: false, required: false, hint: "Attiva questo selettore per salvare l'articolo come bozza. L'articolo rimarrà visibile nel pannello admin ma sparirà dal sito pubblico." }
      - { label: "Slug URL", name: "slug", widget: "string", required: false, hint: "Opzionale. Se lasciato vuoto, l'indirizzo web viene generato automaticamente dal titolo (es: /mio-evento/)." }
      - label: "Categoria"
        name: "categories"
        widget: "select"
        default: ["blog"]
        multiple: true
        options:
          - { label: "Eventi & Menù (blog)", value: "blog" }
          - { label: "Video Performance (video)", value: "video" }
          - { label: "Scritti & Opinioni (writes)", value: "writes" }
      - label: "Tag Tematici"
        name: "tags"
        widget: "select"
        multiple: true
        required: false
        options:
          - "Food Design & Eat Art"
          - "Eventi Aziendali & Corporate"
          - "Design & Fuori Salone"
          - "Mixology & Food Pairing"
          - "Cene a Tema & Storytelling"
          - "Consulenza & Formazione"
          - "Cultura & Critica Gastronomica"
          - "Libri & Pubblicazioni"
          - "Alta Cucina & Tecniche"
      - { label: "Descrizione SEO (Snippet Google)", name: "description", widget: "string", required: false, hint: "Ottimale tra 140 e 160 caratteri. Se non inserita, viene estratta in automatico dai primi 155 caratteri dell'articolo." }
      - { label: "Immagine in Evidenza (OpenGraph / Anteprima)", name: "featured_image", widget: "image", required: false }
      - { label: "ID Video Vimeo (es. 4280174)", name: "vimeo_id", widget: "string", required: false }
      - { label: "ID Video YouTube", name: "youtube_id", widget: "string", required: false }
      - { label: "Menù in PDF Scaricabile", name: "pdf_url", widget: "file", required: false }
      - label: "Galleria Fotografica"
        name: "gallery_images"
        widget: "list"
        required: false
        fields:
          - { label: "Immagine Completa", name: "full", widget: "image" }
          - { label: "Miniatura WebP", name: "thumb", widget: "image", required: false }
          - { label: "Testo Alternativo (Alt per SEO)", name: "alt", widget: "string" }
      - { label: "Testo Articolo", name: "body", widget: "markdown" }
