Skip to content

Commit

Permalink
add events collection and relation to authors?
Browse files Browse the repository at this point in the history
  • Loading branch information
shushugah committed Feb 4, 2024
1 parent 8ac9417 commit 1388261
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions admin/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ backend:
branch: develop # Branch to update (optional; defaults to master)
accept_roles: #optional - accepts all users if left out
- admin
- editor
- editor
commit_messages:
create: Add {{collection}} "{{slug}}" via DecapCMS
update: Update {{collection}} "{{slug}}" via DecapCMS
delete: Delete {{collection}} "{{slug}}" via DecapCMS

media_folder: "assets/img"

collections:
- name: "event" # Used in routes, e.g., /admin/collections/blog
- name: "event" # Used in routes, e.g., /admin/collections/event
label: "Event" # Used in the UI
folder: "_events" # The path to the folder where the documents are stored
create: true # Allow users to create new documents in this collection
Expand All @@ -20,3 +24,15 @@ collections:
- {label: "Tags", name: "tags", widget: "list"}
- {label: "Body", name: "body", widget: "markdown"}
- {label: "Optional image for SEO", name: "image", widget: "image", required: false}
- name: "blog" # Used in routes, e.g., /admin/collections/blog
slug: '{{year}}-{{month}}-{{day}}-{{slug}}'
label: "Blog" # Used in the UI
folder: "_blog" # The path to the folder where the documents are stored
create: true # Allow users to create new documents in this collection
fields: # The fields for each document, usually in front matter
- {label: "Title", name: "title", widget: "string"}
- {label: "Date", name: "date", widget: "datetime", picker_utc: true }
- {label: "Canonical url", name: "canonical_url", widget: "string", required: false}
- {label: "Tags", name: "tags", widget: "list"}
- {label: "Body", name: "body", widget: "markdown"}
- {label: "Author", name: "author", widget: "relation", collection: "data.authors", search_fields: ['name'], value_field: "{{name}}" }

0 comments on commit 1388261

Please sign in to comment.