Refactor fields in config.yml for posts collection and update image handling
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 42s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 42s
This commit is contained in:
@@ -20,63 +20,53 @@ collections:
|
||||
editor:
|
||||
preview: false
|
||||
fields:
|
||||
- { label: "Layout", name: "layout", widget: "hidden", default: "post" }
|
||||
- { label: "Title", name: "title", widget: "string" }
|
||||
- { label: "Summary", name: "summary", widget: "string", required: false }
|
||||
- { label: "Description", name: "description", widget: "string", required: false }
|
||||
- {
|
||||
label: "Authors",
|
||||
name: "authors",
|
||||
widget: "select",
|
||||
multiple: False,
|
||||
options: ["Benno Lorenz"],
|
||||
}
|
||||
- { label: "Date", name: "date", widget: "datetime" }
|
||||
- { label: "Draft", name: "draft", widget: "boolean", default: true }
|
||||
|
||||
- { label: "Cover Style", name: "heroStyle", widget: "select", options: ["basic", "big", "background", "thumbAndBackground"], default: "default" }
|
||||
- { label: "Cover Image", name: "image", widget: "image", required : false }
|
||||
- { label: "Cover Style", name: "cover_style", widget: "select", options: ["basic", "big", "background", "thumbAndBackground"], default: "default" }
|
||||
|
||||
|
||||
|
||||
- {
|
||||
label: "images",
|
||||
name: "images",
|
||||
widget: "image",
|
||||
required: false,
|
||||
multiple: true,
|
||||
}
|
||||
- label: "images"
|
||||
name: "images"
|
||||
widget: "image"
|
||||
required: false
|
||||
media_folder: "img"
|
||||
choose_url: false
|
||||
media_library:
|
||||
config:
|
||||
multiple: true
|
||||
- { label: "Body", name: "body", widget: "markdown" }
|
||||
########################
|
||||
# POSTS COLLECTION
|
||||
########################
|
||||
- name: "posts"
|
||||
label: "Posts"
|
||||
folder: "content/posts"
|
||||
path: "{{year}}-{{month}}-{{day}}-{{title}}/index"
|
||||
media_folder: ""
|
||||
public_folder: ""
|
||||
create: true
|
||||
slug: "index"
|
||||
# Nested can be used for deeper than 2 layers of folders
|
||||
# nested:
|
||||
# depth: 100 # max depth to show in the collection tree
|
||||
# summary: '{{title}}' # optional summary for a tree node, defaults to the inferred title field
|
||||
editor:
|
||||
preview: false
|
||||
fields:
|
||||
# - { label: "Layout", name: "layout", widget: "hidden", default: "post" }
|
||||
- { label: "Title", name: "title", widget: "string" }
|
||||
- { label: "Summary", name: "summary", widget: "string" }
|
||||
# - { label: "Description", name: "description", widget: "string" }
|
||||
- {
|
||||
label: "Authors",
|
||||
name: "authors",
|
||||
widget: "select",
|
||||
multiple: true,
|
||||
options: ["bob", "jane", "peter", "kate"],
|
||||
}
|
||||
- { label: "Date", name: "date", widget: "datetime" }
|
||||
- { label: "Draft", name: "draft", widget: "boolean", default: true }
|
||||
- { label: "Cover Image", name: "image", widget: "image" }
|
||||
- { label: "Body", name: "body", widget: "markdown" }
|
||||
# - name: "posts"
|
||||
# label: "Posts"
|
||||
# folder: "content/posts"
|
||||
# path: "{{year}}-{{month}}-{{day}}-{{title}}/index"
|
||||
# media_folder: ""
|
||||
# public_folder: ""
|
||||
# create: true
|
||||
# slug: "index"
|
||||
# # Nested can be used for deeper than 2 layers of folders
|
||||
# # nested:
|
||||
# # depth: 100 # max depth to show in the collection tree
|
||||
# # summary: '{{title}}' # optional summary for a tree node, defaults to the inferred title field
|
||||
# editor:
|
||||
# preview: false
|
||||
# fields:
|
||||
# # - { label: "Layout", name: "layout", widget: "hidden", default: "post" }
|
||||
# - { label: "Title", name: "title", widget: "string" }
|
||||
# - { label: "Summary", name: "summary", widget: "string" }
|
||||
# # - { label: "Description", name: "description", widget: "string" }
|
||||
# - {
|
||||
# label: "Authors",
|
||||
# name: "authors",
|
||||
# widget: "select",
|
||||
# multiple: true,
|
||||
# options: ["bob", "jane", "peter", "kate"],
|
||||
# }
|
||||
# - { label: "Date", name: "date", widget: "datetime" }
|
||||
# - { label: "Draft", name: "draft", widget: "boolean", default: true }
|
||||
# - { label: "Cover Image", name: "image", widget: "image" }
|
||||
# - { label: "Body", name: "body", widget: "markdown" }
|
||||
|
||||
Reference in New Issue
Block a user