# GENERADO por scripts/admin-config.mjs. No editar: cambia admin/base.yml o admin/collections/*.yml.
backend:
  name: github
  repo: grupobeetlesl-ctrl/grupobeetle-web
  branch: main
  base_url: https://admin.grupobeetle.com
  auth_endpoint: api/auth
  auth_scope: repo
  squash_merges: true
  commit_messages:
    create: "Contenido: crea {{collection}} «{{slug}}»"
    update: "Contenido: actualiza {{collection}} «{{slug}}»"
    delete: "Contenido: elimina {{collection}} «{{slug}}»"
    uploadMedia: "Medios: sube «{{path}}»"
    deleteMedia: "Medios: elimina «{{path}}»"
publish_mode: editorial_workflow
site_url: https://grupobeetle.com
display_url: https://grupobeetle.com
app_title: Administración · Grupo Beetle
media_folder: public/media/uploads
public_folder: /media/uploads
media_libraries:
  default:
    config:
      slugify_filename: true
      max_file_size: 31457280
      transformations:
        raster_image:
          format: webp
          quality: 82
          width: 2000
          height: 2000
        svg:
          optimize: true
slug:
  encoding: ascii
  clean_accents: true
  sanitize_replacement: "-"
collections:
  - name: recursos
    label: Recursos (guías y artículos)
    label_singular: artículo
    folder: src/content/recursos
    extension: md
    format: frontmatter
    create: true
    identifier_field: title
    slug: "{{slug}}"
    summary: "{{title}}"
    preview_path: recursos/{{slug}}
    sortable_fields:
      - title
      - pubDate
    media_folder: portadas
    public_folder: portadas
    fields:
      - name: title
        label: Título
        widget: string
        maxlength: 110
        hint: Máximo 110 caracteres. Es el título del artículo y del resultado en Google.
      - name: description
        label: Descripción para Google
        widget: text
        minlength: 80
        maxlength: 170
        hint: "Entre 80 y 170 caracteres (lo ideal: 120–160). Resume el artículo; no repitas el título."
      - name: type
        label: Tipo
        widget: select
        options:
          - guia
          - articulo
          - formacion
      - name: pubDate
        label: Fecha de publicación
        widget: datetime
        date_format: YYYY-MM-DD
        time_format: false
      - name: updatedDate
        label: Fecha de actualización
        widget: datetime
        date_format: YYYY-MM-DD
        time_format: false
        required: false
        hint: Solo si actualizas un artículo ya publicado.
      - name: author
        label: Autor
        widget: hidden
        default: Equipo Grupo Beetle
      - name: category
        label: Categoría
        widget: select
        options:
          - Ecosistemas digitales
          - Rendimiento web
          - SEO
          - Ecommerce
          - Automatización
          - IA para marcas
      - name: tags
        label: Etiquetas
        widget: list
        default: []
        required: false
        hint: Palabras clave cortas, en minúsculas.
      - name: cover
        label: Portada
        widget: image
        accept: image/webp,image/jpeg,image/png
        choose_url: false
        media_libraries:
          default:
            config:
              max_file_size: 5242880
        hint: Imagen horizontal. Se convierte a WebP y se reduce sola. Máximo 5 MB.
      - name: coverAlt
        label: Texto alternativo de la portada (obligatorio)
        widget: string
        minlength: 20
        hint: Describe lo que se ve en la imagen, mínimo 20 caracteres. Lo leen los lectores de pantalla y Google.
      - name: featured
        label: Destacado en la portada de Recursos
        widget: boolean
        default: false
        required: false
      - name: draft
        label: Ocultar de la web (borrador permanente)
        widget: boolean
        default: false
        required: false
        hint: Déjalo desactivado salvo que quieras que un artículo publicado deje de verse.
      - name: body
        label: Contenido
        widget: markdown
        editor_components: []
        modes:
          - rich_text
          - raw
