Skip to content

Commit

Permalink
chore: extend blog example
Browse files Browse the repository at this point in the history
  • Loading branch information
davidenke committed Oct 26, 2024
1 parent c54b637 commit ea33fa8
Showing 1 changed file with 59 additions and 1 deletion.
60 changes: 59 additions & 1 deletion public/examples/blog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ media_folder: "/public/media"
public_folder: "/public/media"

collections:
- name: "blog" # Used in routes, e.g., /admin/collections/blog
- name: "blog"
label: "Blog"
folder: "src/content/blog"
create: true
Expand All @@ -26,3 +26,61 @@ collections:
- { label: "Rating", name: "rating", widget: "number", min: 1, max: 5 }
- { label: "Code", name: "code", widget: "code", output_code_only: true }
- { label: "Body", name: "body", widget: "markdown" }
# list examples
- label: "Avatars"
name: "avatars"
widget: "list"
summary: "{{fields.avatar}}"
field: { label: Avatar, name: avatar, widget: image }
- label: "Testimonials"
name: "testimonials"
minimize_collapsed: true
widget: "list"
fields:
- {
label: Quote,
name: quote,
widget: string,
default: "Everything is awesome!",
}
- { label: Author, name: author, widget: string }
- name: "typo"
label: "Typography"
widget: "list"
types:
- name: "heading"
label: "Heading"
widget: "object"
fields:
- name: "text"
label: "Text"
widget: "text"
- name: "level"
label: "Level"
widget: "number"
default: 1
min: 1
max: 6
- name: "style"
label: "Style"
widget: "select"
default: ""
options:
- { label: "None", value: "" }
- { label: "Title", value: "title" }
- name: "text"
label: "Text"
widget: "object"
fields:
- name: "text"
label: "Text"
widget: "markdown"
minimal: true
buttons: ["link"]
- name: "style"
label: "Style"
widget: "select"
default: "body"
options:
- { label: "Lead", value: "lead" }
- { label: "Body", value: "body" }

0 comments on commit ea33fa8

Please sign in to comment.