backend:
  name: github
  branch: main
  repo: d1sc0/hellostu--xyz

media_folder: 'src/assets/uploaded_images'

collections:
  - name: 'posts'
    label: 'Posts'
    folder: 'src/content/posts'
    create: true
    slug: '{{slug}}'
    extension: 'md'
    format: 'yaml-frontmatter'
    media_folder_relative: true
    sortable_fields: ['title', 'pubDate']
    default_sort:
      - { field: pubDate, direction: descending }
    fields:
      - { label: 'Title', name: 'title', widget: 'string' }
      - { label: 'Slug', name: 'slug', widget: 'string' }
      - { label: 'Draft', name: 'draft', widget: 'boolean' }
      - { label: 'Date', name: 'pubDate', widget: 'datetime' }
      - {
          label: 'Category',
          name: 'category',
          widget: 'select',
          options: ['Work', 'Rest', 'Play'],
        }
      - {
          label: 'Feature Image',
          name: 'featureImage',
          widget: 'image',
          required: false,
          hint: 'Optional override image for home stream and social image generation',
        }
      - { label: 'Body', name: 'body', widget: 'markdown' }
      - { label: 'Meta Preview', name: 'description', widget: 'text' }
      - { label: 'Tags', name: 'tags', widget: 'list' }

  - name: 'mdx_posts'
    label: 'MDX Posts'
    folder: 'src/content/posts'
    create: true
    slug: '{{slug}}'
    extension: 'mdx'
    format: 'yaml-frontmatter'
    media_folder_relative: true
    sortable_fields: ['title', 'pubDate']
    default_sort:
      - { field: pubDate, direction: descending }
    fields:
      - { label: 'Title', name: 'title', widget: 'string' }
      - { label: 'Slug', name: 'slug', widget: 'string' }
      - { label: 'Draft', name: 'draft', widget: 'boolean' }
      - { label: 'Date', name: 'pubDate', widget: 'datetime' }
      - {
          label: 'Category',
          name: 'category',
          widget: 'select',
          options: ['Work', 'Rest', 'Play'],
        }
      - {
          label: 'Feature Image',
          name: 'featureImage',
          widget: 'image',
          required: false,
          hint: 'Optional override image for home stream and social image generation',
        }
      - { label: 'Body', name: 'body', widget: 'markdown' }
      - { label: 'Meta Preview', name: 'description', widget: 'text' }
      - { label: 'Tags', name: 'tags', widget: 'list' }

  - name: 'mdx_pages'
    label: 'Pages'
    folder: 'src/content/pages'
    create: true
    slug: '{{slug}}'
    extension: 'mdx'
    format: 'yaml-frontmatter'
    media_folder_relative: true
    fields:
      - { label: 'Title', name: 'title', widget: 'string' }
      - { label: 'Date', name: 'pubDate', widget: 'datetime', required: false }
      - { label: 'Description', name: 'description', widget: 'text' }
      - {
          label: 'Feature Image',
          name: 'featureImage',
          widget: 'image',
          required: false,
          hint: 'Optional override image for social image generation',
        }
      - { label: 'Body', name: 'body', widget: 'markdown' }

  - name: 'navigation_main'
    label: 'Main Site Menu'
    files:
      - file: 'src/content/main-nav.json'
        label: 'Main Site Menu'
        name: 'main_menu'
        fields:
          - label: 'Links'
            name: 'links'
            widget: 'list'
            fields:
              - { label: 'Label', name: 'label', widget: 'string' }
              - { label: 'URL', name: 'url', widget: 'string' }

  - name: 'navigation_footer'
    label: 'Footer Menu'
    files:
      - file: 'src/content/footer-nav.json'
        label: 'Footer Menu'
        name: 'footer_menu'
        fields:
          - label: 'Links'
            name: 'links'
            widget: 'list'
            fields:
              - { label: 'Label', name: 'label', widget: 'string' }
              - { label: 'URL', name: 'url', widget: 'string' }

  - name: 'social-links'
    label: 'Social Links'
    files:
      - file: 'src/content/social-links.json'
        label: 'Social Links'
        name: 'social_links'
        fields:
          - label: 'Links'
            name: 'links'
            widget: 'list'
            fields:
              - { label: 'Label', name: 'label', widget: 'string' }
              - { label: 'URL', name: 'url', widget: 'string' }
              - { label: 'Icon', name: 'icon', widget: 'string' }
              - { label: 'Aria Label', name: 'aria', widget: 'string' }

  - name: 'galleries'
    label: 'Galleries'
    media_folder_relative: true
    files:
      - file: 'src/content/galleries.yaml'
        label: 'Image Galleries'
        name: 'image_galleries'
        fields:
          - label: 'Galleries'
            name: 'galleries'
            widget: 'list'
            summary: '{{fields.id}}'
            fields:
              - {
                  label: 'Gallery ID',
                  name: 'id',
                  widget: 'string',
                  hint: 'Used in MDX component prop: <MdxImageGallery gallery="your-id" />',
                }
              - {
                  label: 'Title',
                  name: 'title',
                  widget: 'string',
                  required: false,
                }
              - label: 'Images'
                name: 'images'
                widget: 'list'
                fields:
                  - { label: 'Image', name: 'src', widget: 'image' }
                  - {
                      label: 'Alt Text',
                      name: 'alt',
                      widget: 'string',
                      required: false,
                    }
                  - {
                      label: 'Caption',
                      name: 'caption',
                      widget: 'string',
                      required: false,
                    }
