media_folder: static/img/uploads
public_folder: /img/uploads

site_url: https://sources.spotlightpa.org
display_url: https://sources.spotlightpa.org
logo_url: https://www.spotlightpa.org/img/logos/capitol-moody-logo-500.jpeg

show_preview_links: true

backend:
  name: git-gateway
  branch: main

yaml-definitions: &page-fields
  - label: "URL path"
    hint: E.g. /about/
    name: url
    widget: string
    required: false
  - label: Title
    name: title
    hint: "Title as it appears at top of page"
    widget: string
  - label: Summary
    name: description
    hint: "Shown in social share previews and search results"
    widget: string
    required: false
  - label: Body
    name: body
    widget: markdown
  - label: "Override title tag"
    name: title-tag
    widget: string
    hint: "Set title tag separately from page hed"
    required: false
  - label: Link to as
    name: linktitle
    hint: "When linking to this page from another page, use this as the link title instead of hed"
    widget: string
    required: false
  - label: "No index"
    name: no-index
    hint: "Hide page on Google etc."
    widget: boolean
    required: false
  - label: URL path aliases
    label_singular: alias
    name: aliases
    widget: list
    default: []
    field:
      label: Path
      name: path
      widget: string

collections:
  - label: People
    label_singular: Person
    name: people
    folder: content/people
    filter: { field: "layout", value: "person" }
    format: json
    extension: md
    create: true
    slug: "{{title}}"
    preview_path: /people/{{slug}}/
    identity_field: title
    editor:
      preview: false
    fields:
      - label: Full name
        hint: E.g. "John Jacob Jingleheimer Schmidt, IV PhD CPA"
        name: title
        widget: string
        required: true
      - label: Short name
        hint: E.g. "John Schmidt" or "Betty Jo Smith-Rodriguez"
        name: linktitle
        widget: string
        required: true
      - label: First name
        hint: E.g. "John" or "Betty Jo"
        name: first
        widget: string
        required: true
      - label: Last name
        hint: E.g. "Schmidt" or "Smith-Rodriguez"
        name: last
        widget: string
        required: true
      - label: Pronunciation
        hint: E.g. "Err On" "Co Bye Ah She"
        name: pronunciation
        widget: string
        required: false
      - label: Honorific
        hint: E.g. Dr., Prof., Mr., Ms., Mx.
        name: honorific
        widget: string
        required: false
      - label: Pronoun
        hint: E.g. "he/him," "she/her," "they/them"
        name: pronoun
        widget: string
        required: false
      - label: Title or Profession
        hint: E.g. Assistant Professor of Example Studies
        name: role
        widget: string
        required: false
      - label: Expertise
        name: expertise
        widget: list
        required: false
      - label: Keywords
        name: keywords
        widget: list
        required: false
      - label: Email
        name: email
        widget: email
        required: false
      - label: "Headshot"
        name: "images"
        widget: list
        summary: "{{fields.image}}"
        field: { label: Image, name: image, widget: image }
      - label: Website
        hint: Full URL with http://
        name: website
        widget: string
        required: false
      - label: Facebook
        hint: Just the username without http://facebook.com/
        name: facebook
        widget: string
        required: false
      - label: Twitter
        hint: Just the username without the @
        name: twitter
        widget: string
        required: false
      - label: Instagram
        hint: Just the username without the @
        name: instagram
        widget: string
        required: false
      - label: LinkedIn
        hint: Just the username without the https://www.linkedin.com/in/
        name: linkedin
        widget: string
        required: false
      - label: Location
        hint: E.g. "Philadelphia, PA", "California", "Canada"
        name: location
        widget: list
        required: false
        field:
          label: Location
          name: location
          widget: string
      - label: "Phone"
        hint: Just the digits
        name: phone
        widget: string
        required: false
      - label: Biography
        name: bio
        widget: markdown
        required: false
      - label: layout
        name: layout
        default: person
        widget: hidden
        required: true
  - label: Landing pages
    name: landing
    editor:
      preview: false
    files:
      - label: "Homepage"
        name: homepage
        file: content/_index.md
        format: toml-frontmatter
        fields: *page-fields
      - label: "People list page"
        name: people
        file: content/people/_index.md
        format: toml-frontmatter
        fields: *page-fields
      - label: "Location list page"
        name: location
        file: content/location/_index.md
        format: toml-frontmatter
        fields: *page-fields
      - label: "Expertise list page"
        name: expertise
        file: content/expertise/_index.md
        format: toml-frontmatter
        fields: *page-fields
  - label: Content pages
    name: pages
    folder: pages
    format: toml-frontmatter
    extension: md
    create: true
    slug: "{{url}}"
    preview_path: "/{{slug}}/"
    editor:
      preview: false
    fields: *page-fields
  - label: Settings
    name: data
    editor:
      preview: false
    files:
      - label: Menus
        name: menus
        file: config/_default/menus.toml
        fields:
          - label: "Site navbar items"
            label_singular: "menu item"
            name: navbar
            hint: "Only shows on desktops"
            widget: list
            fields: &menu
              - label: "Display Name"
                name: name
                widget: string
                required: true
              - label: URL
                name: url
                widget: string
                required: true
              - label: Order
                name: weight
                widget: number
                value_type: int
                required: false
          - label: "Menu items"
            label_singular: "menu item"
            name: mobile
            hint: "Only shows on mobile/tablet"
            widget: list
            fields: *menu
          - label: "Footer menu items"
            label_singular: "menu item"
            name: footer
            hint: "Footer pages list, first column"
            widget: list
            fields: *menu
          - label: "Social menu items"
            label_singular: "menu item"
            name: social
            hint: "Footer social links"
            widget: list
            fields: *menu
