From ea33fa86ca8df3ce8417ca09a265e2350b1ced8a Mon Sep 17 00:00:00 2001 From: David Enke Date: Sat, 26 Oct 2024 02:15:55 +0200 Subject: [PATCH] chore: extend blog example --- public/examples/blog.yml | 60 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/public/examples/blog.yml b/public/examples/blog.yml index 95091b9..5fe6d8a 100644 --- a/public/examples/blog.yml +++ b/public/examples/blog.yml @@ -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 @@ -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" }