
backend:
  name: github
  repo: saragebran/oikos-archive # Path to your GitHub repository
  open_authoring: true
  commit_messages:
    create: Create {{collection}} “{{slug}}” [skip netlify]
    update: Update {{collection}} “{{slug}}” [skip netlify]
    delete: Delete {{collection}} “{{slug}}” [skip netlify]
    uploadMedia: Upload “{{path}}” [skip netlify]
    deleteMedia: Delete “{{path}}” [skip netlify]
    openAuthoring: Open Auth - "{{message}}" [skip netlify]

publish_mode: editorial_workflow

media_folder: "site/static/img" # Folder where user uploaded files should go
public_folder: "/img"

local_backend: true

sortable_fields:
  fields: ['commit_date', 'title', 'commit_author']

collections:
  - name: "species"
    label: "Species"
    slug: "{{uuid}}"
    identifier_field: "uuid"
    folder: "site/content/species"
    path: '{{slug}}/_index'
    media_folder: ''
    public_folder: ''
    create: true
    summary: "{{fileName}} - {{category}}"
    fields:
      - {label: "ID", name: "uuid", widget: "uuid", allow_regenerate: false}
      - {label: "File Name", name: "fileName", widget: "string"}
      - label: "Species Name"
        name: "languages"
        widget: "list"
        fields:
          - {label: "Language", name: "language", widget: "string"}
          - {label: "Name of the species in that language", name: "names", widget: "list", field: {label: "Name", name: "name", widget: "string"}}
      - {label: "Kind", name: "kind", widget: "hidden", default: "species"}
      - {label: "What color do you feel is connected to this species?", name: "color", widget: "color", default: "#00ff00", allowInput: true, enableAlpha: false}
      - {label: "Category", name: "category", widget: "select", options: ["Animal", "Plant", "Fungus", "Other"]}
      - {label: "Add your personal story or knowledge about this species (don't delete existing text)", name: "body", widget: "markdown"}
  - name: "representations"
    label: "Representations"
    identifier_field: "title"  
    folder: "site/content/representations"
    path: '{{speciesid}}/{{title}}'
    create: true
    media_folder: ''
    public_folder: ''
    fields:
      - {label: "Kind", name: "kind", widget: "hidden", default: "representations"}
      - label: "Species"
        name: "speciesid"
        widget: "relation"
        collection: "species"
        options_length: 10
        search_fields: ["fileName"]
        value_field: "uuid"
        display_fields: ["fileName"]
      - label: "Upload an image from your computer"
        name: "image"
        widget: "image"
        hint: "Max file size: 512kb"
      - label: "Title"  
        name: "title"
        widget: "string"
        hint: Title your artwork.
      - label: "Description of your artwork"
        name: "description"
        widget: "text"
        hint: "Describe your picture or the story behind it."
      - label: "Your Name"
        name: "author"
        widget: "string"
        hint: "Your name will be displayed on the site."
      - label: "Link"
        name: "link"
        widget: "string"
        hint: "Link to your website, social media handle or information about the work."
        required: false
      - label: "Year"
        name: "year"
        widget: "string"
        hint: "The year that you created the artwork"
  - name: "pages"
    label: "Pages"
    folder: "site/content/pages/"
    create: true # Allows creation of new pages within the admin interface
    extension: "md"
    format: "frontmatter"
    fields:
      - {label: "Title", name: "title", widget: "string"}
      - {label: "Publish Date", name: "date", widget: "datetime"}
      - {label: "Author", name: "author", widget: "string"}
      - {label: "Content", name: "body", widget: "markdown"}
