Skip to content

Commit

Permalink
cms editing for blog posts
Browse files Browse the repository at this point in the history
  • Loading branch information
docsteveharris committed Oct 28, 2024
1 parent 61edb57 commit ed85d31
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions admin/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,15 @@ backend:
media_folder: "assets/uploads"

collections:
- name: "blog"
label: "Blog"
folder: "_posts/"
fields:
- { name: Title }
- name: "blog" # Used in routes, e.g., /admin/collections/blog
label: "Blog" # Used in the UI
folder: "_posts/" # The path to the folder where the documents are stored
create: true # Allow users to create new documents in this collection
slug: "{{year}}-{{month}}-{{day}}-{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md
fields: # The fields for each document, usually in front matter
- { label: "Layout", name: "layout", widget: "hidden", default: "blog" }
- { label: "Title", name: "title", widget: "string" }
- { label: "Publish Date", name: "date", widget: "datetime" }
- { label: "Featured Image", name: "thumbnail", widget: "image" }
- { label: "Rating (scale of 1-5)", name: "rating", widget: "number" }
- { label: "Body", name: "body", widget: "markdown" }

0 comments on commit ed85d31

Please sign in to comment.