# SealingSeason content admin (Sveltia/Decap). Deployed at admin.sexycanner.com.
# Commits content into the site repo; Netlify rebuilds site/ → live.

backend:
  name: github
  repo: bdowling/sealingseason.site
  branch: main
  # OAuth relay = Netlify Functions on THIS admin site (see netlify/functions/).
  base_url: https://admin.sexycanner.com
  auth_endpoint: .netlify/functions/auth

# Drafts → in review → ready, as PRs an owner approves before publishing.
publish_mode: editorial_workflow

# Uploaded photos land in the site's public/ tree → served at /images/uploads/…
media_folder: "site/public/images/uploads"
public_folder: "/images/uploads"

collections:
  - name: settings
    label: Site & Homepage
    files:
      - name: site
        label: Site (stats, socials, tagline)
        file: site/src/data/site.json
        fields:
          - { name: tagline, label: Tagline, widget: text }
          - name: stats
            label: Marketing stats
            widget: list
            summary: "{{fields.num}} — {{fields.label}}"
            fields:
              - { name: num, label: Number, widget: string }
              - { name: label, label: Label, widget: string }
          - name: social
            label: Social links
            widget: object
            fields:
              - { name: facebook, label: Facebook page, widget: string, required: false }
              - { name: instagram, label: Instagram, widget: string, required: false }
              - { name: youtube, label: YouTube, widget: string, required: false }
              - { name: pinterest, label: Pinterest, widget: string, required: false }
              - { name: tiktok, label: TikTok, widget: string, required: false }
              - { name: facebookGroup, label: Facebook group, widget: string, required: false }
      - name: home
        label: Homepage
        file: site/src/data/home.json
        fields:
          - { name: eyebrow, label: Eyebrow, widget: string }
          - { name: headline, label: Headline, widget: string }
          - { name: headlineEm, label: Headline (emphasis / mint), widget: string }
          - { name: sub, label: Sub-headline, widget: text }
          - { name: ctaPrimaryLabel, label: Primary button text, widget: string }
          - { name: ctaPrimaryHref, label: Primary button link, widget: string }
          - { name: ctaGhostLabel, label: Secondary link text, widget: string }
          - { name: ctaGhostHref, label: Secondary link, widget: string }
          - name: slogans
            label: Rotating slogans
            widget: list
            summary: "{{fields.main}}"
            fields:
              - { name: main, label: Main line, widget: string }
              - { name: sub, label: Sub line, widget: string }
          - { name: newsletterTitle, label: Newsletter title, widget: string }
          - { name: newsletterBody, label: Newsletter blurb, widget: text }
      - name: advertise
        label: Media kit / Advertise
        file: site/src/data/advertise.json
        fields:
          - { name: deck, label: Intro, widget: text }
          - { name: audienceRatio, label: Audience ratio (big number), widget: string }
          - { name: audienceText, label: Audience text, widget: text }
          - name: packages
            label: Sponsorship packages
            widget: list
            summary: "{{fields.name}} — {{fields.price}}"
            fields:
              - { name: name, label: Name, widget: string }
              - { name: price, label: Price, widget: string }
              - { name: priceNote, label: Price note, widget: string }
              - { name: peak, label: Peak-season note, widget: string }
              - { name: featured, label: Highlight as popular, widget: boolean, default: false }
              - { name: features, label: Features, widget: list, field: { name: feature, widget: string } }
          - name: seasons
            label: Seasonality
            widget: list
            fields:
              - { name: months, label: Months, widget: string }
              - { name: label, label: Label, widget: string }
              - { name: note, label: Note, widget: string }
          - { name: brands, label: Brand categories, widget: list, field: { name: brand, widget: string } }
          - { name: contactEmail, label: Contact email, widget: string }
          - { name: mediaKitUrl, label: Media kit PDF, widget: file, required: false }

  - name: pages
    label: Pages
    label_singular: Page
    folder: site/src/content/pages
    extension: md
    format: frontmatter
    create: true
    slug: "{{title}}"
    summary: "{{title}}"
    fields:
      - { name: title, label: Title, widget: string }
      - { name: deck, label: Deck / intro, widget: text, required: false }
      - { name: hero, label: Hero photo, widget: image, required: false }
      - { name: showStats, label: Show the stats band, widget: boolean, default: false }
      - { name: updated, label: Updated, widget: datetime, format: 'YYYY-MM-DD', date_format: 'YYYY-MM-DD', time_format: false }
      - { name: draft, label: "Draft (hide from site)", widget: boolean, default: false }
      - { name: body, label: Body, widget: markdown }

  - name: recipes
    label: Recipes
    label_singular: Recipe
    folder: site/src/content/recipes
    extension: json
    format: json
    create: true
    # filename (and therefore URL slug) is derived from the title
    slug: "{{title}}"
    identifier_field: title
    summary: "{{title}}  ·  {{method}}"
    fields:
      - { name: title, label: Title, widget: string }
      - { name: method, label: Method, widget: select,
          options: [pressure, water-bath, jam, freeze, ferment, storage] }
      - { name: ingredient, label: Main ingredient, widget: string }
      - { name: difficulty, label: Difficulty, widget: select,
          options: [beginner, intermediate, advanced], default: beginner }
      - { name: season, label: Season, widget: select, multiple: true, required: false,
          options: [spring, summer, fall, winter] }
      - { name: tested, label: USDA tested?, widget: select,
          options: [usda, untested], default: usda }
      - { name: hero, label: Hero photo, widget: image, required: false }
      - { name: deck, label: Intro paragraph, widget: text }
      - { name: readMinutes, label: Read time (min), widget: number, value_type: int, default: 8 }
      - { name: yieldJars, label: Yield (jars per batch), widget: number, value_type: int }
      - { name: jarSize, label: Jar size, widget: string, default: quart }
      - { name: prepTime, label: Prep (min), widget: number, value_type: int }
      - { name: processTime, label: Process (min), widget: number, value_type: int }
      - name: pressure
        label: Pressure (pressure canning only)
        widget: object
        required: false
        collapsed: true
        fields:
          - { name: dial, label: Dial gauge (lb), widget: number, value_type: int }
          - { name: weighted, label: Weighted gauge (lb), widget: number, value_type: int }
      - { name: shelfLife, label: Shelf life, widget: string, default: "12–18 months" }
      - name: ingredients
        label: Ingredients
        widget: list
        summary: "{{fields.amount}} {{fields.unit}} {{fields.item}}"
        fields:
          - { name: amount, label: Amount, widget: number, value_type: float }
          - { name: unit, label: Unit, widget: string }
          - { name: item, label: Item, widget: string }
          - { name: base, label: "Base (set = Amount; powers the batch scaler)", widget: number, value_type: float }
      - { name: equipment, label: Equipment, widget: list,
          field: { name: item, label: Item, widget: string } }
      - name: steps
        label: Steps
        widget: list
        summary: "{{fields.title}}"
        fields:
          - { name: title, label: Step title, widget: string }
          - { name: body, label: Step text, widget: text }
          - { name: tip, label: Tip (optional), widget: string, required: false }
      - name: safety
        label: Safety notes
        widget: list
        required: false
        summary: "[{{fields.type}}] {{fields.text}}"
        fields:
          - { name: type, label: Type, widget: select, options: [safety, danger, tip, storage] }
          - { name: text, label: Text (supports **bold**), widget: text }
      - name: altitude
        label: Altitude table
        widget: list
        required: false
        fields:
          - { name: range, label: Elevation range, widget: string }
          - { name: dial, label: Dial (lb), widget: number, value_type: int, required: false }
          - { name: weighted, label: Weighted (lb), widget: number, value_type: int, required: false }
          - { name: minutes, label: Process min (water bath), widget: number, value_type: int, required: false }
      - name: faq
        label: FAQ
        widget: list
        required: false
        fields:
          - { name: q, label: Question, widget: string }
          - { name: a, label: Answer, widget: text }
      - name: gear
        label: Affiliate gear
        widget: list
        required: false
        summary: "{{fields.name}}"
        fields:
          - { name: name, label: Name, widget: string }
          - { name: asin, label: Amazon ASIN, widget: string, required: false }
          - { name: note, label: Note, widget: string, required: false }
      - { name: related, label: Related recipe slugs, widget: list, required: false,
          field: { name: slug, widget: string } }
      - { name: updated, label: Last updated, widget: datetime, format: 'YYYY-MM-DD', date_format: 'YYYY-MM-DD', time_format: false }

  - name: articles
    label: Guides & Articles
    label_singular: Article
    folder: site/src/content/articles
    extension: md
    format: frontmatter
    create: true
    slug: "{{title}}"
    summary: "{{title}}"
    fields:
      - { name: title, label: Title, widget: string }
      - { name: deck, label: Deck / intro, widget: text }
      - { name: hero, label: Hero photo, widget: image, required: false }
      - { name: author, label: Author, widget: string, default: "SealingSeason Editors" }
      - { name: category, label: Category, widget: string, default: Guides }
      - { name: tags, label: Tags, widget: list, required: false, field: { name: tag, widget: string } }
      - { name: updated, label: Updated, widget: datetime, format: 'YYYY-MM-DD', date_format: 'YYYY-MM-DD', time_format: false }
      - { name: draft, label: "Draft (hide from site)", widget: boolean, default: true }
      - { name: body, label: Body, widget: markdown }

  - name: gear
    label: Gear Reviews
    label_singular: Gear item
    folder: site/src/content/gear
    extension: md
    format: frontmatter
    create: true
    slug: "{{title}}"
    summary: "{{title}}  ·  {{category}}"
    fields:
      - { name: title, label: Title, widget: string }
      - { name: category, label: Category, widget: select,
          options: [pressure-canner, water-bath-canner, jars, freeze-dryer, dehydrator, tools, other], default: other }
      - { name: brand, label: Brand, widget: string, required: false }
      - { name: image, label: Photo, widget: image, required: false }
      - { name: summary, label: One-line summary, widget: text }
      - { name: rating, label: "Rating (0–5)", widget: number, value_type: float, required: false, min: 0, max: 5, step: 0.1 }
      - { name: price, label: "Price (e.g. $$$ or $189)", widget: string, required: false }
      - { name: pros, label: Pros, widget: list, required: false, field: { name: pro, widget: string } }
      - { name: cons, label: Cons, widget: list, required: false, field: { name: con, widget: string } }
      - { name: amazonAsin, label: "Amazon ASIN (builds the affiliate link)", widget: string, required: false }
      - { name: affiliateUrl, label: "Affiliate URL (overrides Amazon)", widget: string, required: false }
      - { name: updated, label: Updated, widget: datetime, format: 'YYYY-MM-DD', date_format: 'YYYY-MM-DD', time_format: false }
      - { name: draft, label: "Draft (hide from site)", widget: boolean, default: true }
      - { name: body, label: Review, widget: markdown }
