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:
|
editor:
|
||||||
preview: false
|
preview: false
|
||||||
fields:
|
fields:
|
||||||
- { label: "Layout", name: "layout", widget: "hidden", default: "post" }
|
|
||||||
- { label: "Title", name: "title", widget: "string" }
|
- { label: "Title", name: "title", widget: "string" }
|
||||||
- { label: "Summary", name: "summary", widget: "string", required: false }
|
- { label: "Summary", name: "summary", widget: "string", required: false }
|
||||||
- { label: "Description", name: "description", 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: "Date", name: "date", widget: "datetime" }
|
||||||
- { label: "Draft", name: "draft", widget: "boolean", default: true }
|
- { 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 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
|
||||||
- {
|
media_folder: "img"
|
||||||
label: "images",
|
choose_url: false
|
||||||
name: "images",
|
media_library:
|
||||||
widget: "image",
|
config:
|
||||||
required: false,
|
multiple: true
|
||||||
multiple: true,
|
|
||||||
}
|
|
||||||
- { label: "Body", name: "body", widget: "markdown" }
|
- { label: "Body", name: "body", widget: "markdown" }
|
||||||
########################
|
########################
|
||||||
# POSTS COLLECTION
|
# POSTS COLLECTION
|
||||||
########################
|
########################
|
||||||
- name: "posts"
|
# - name: "posts"
|
||||||
label: "Posts"
|
# label: "Posts"
|
||||||
folder: "content/posts"
|
# folder: "content/posts"
|
||||||
path: "{{year}}-{{month}}-{{day}}-{{title}}/index"
|
# path: "{{year}}-{{month}}-{{day}}-{{title}}/index"
|
||||||
media_folder: ""
|
# media_folder: ""
|
||||||
public_folder: ""
|
# public_folder: ""
|
||||||
create: true
|
# create: true
|
||||||
slug: "index"
|
# slug: "index"
|
||||||
# Nested can be used for deeper than 2 layers of folders
|
# # Nested can be used for deeper than 2 layers of folders
|
||||||
# nested:
|
# # nested:
|
||||||
# depth: 100 # max depth to show in the collection tree
|
# # depth: 100 # max depth to show in the collection tree
|
||||||
# summary: '{{title}}' # optional summary for a tree node, defaults to the inferred title field
|
# # summary: '{{title}}' # optional summary for a tree node, defaults to the inferred title field
|
||||||
editor:
|
# editor:
|
||||||
preview: false
|
# preview: false
|
||||||
fields:
|
# fields:
|
||||||
# - { label: "Layout", name: "layout", widget: "hidden", default: "post" }
|
# # - { label: "Layout", name: "layout", widget: "hidden", default: "post" }
|
||||||
- { label: "Title", name: "title", widget: "string" }
|
# - { label: "Title", name: "title", widget: "string" }
|
||||||
- { label: "Summary", name: "summary", widget: "string" }
|
# - { label: "Summary", name: "summary", widget: "string" }
|
||||||
# - { label: "Description", name: "description", widget: "string" }
|
# # - { label: "Description", name: "description", widget: "string" }
|
||||||
- {
|
# - {
|
||||||
label: "Authors",
|
# label: "Authors",
|
||||||
name: "authors",
|
# name: "authors",
|
||||||
widget: "select",
|
# widget: "select",
|
||||||
multiple: true,
|
# multiple: true,
|
||||||
options: ["bob", "jane", "peter", "kate"],
|
# options: ["bob", "jane", "peter", "kate"],
|
||||||
}
|
# }
|
||||||
- { label: "Date", name: "date", widget: "datetime" }
|
# - { label: "Date", name: "date", widget: "datetime" }
|
||||||
- { label: "Draft", name: "draft", widget: "boolean", default: true }
|
# - { label: "Draft", name: "draft", widget: "boolean", default: true }
|
||||||
- { label: "Cover Image", name: "image", widget: "image" }
|
# - { label: "Cover Image", name: "image", widget: "image" }
|
||||||
- { label: "Body", name: "body", widget: "markdown" }
|
# - { label: "Body", name: "body", widget: "markdown" }
|
||||||
|
|||||||
Reference in New Issue
Block a user