mirror of
https://github.com/Colin-XKL/Colinx-Blog.git
synced 2026-01-12 02:31:27 +08:00
50 lines
1.8 KiB
YAML
50 lines
1.8 KiB
YAML
backend:
|
|
name: github
|
|
repo: Colin-XKL/Colinx-Blog
|
|
# This line should *not* be indented
|
|
publish_mode: editorial_workflow
|
|
# These lines should *not* be indented
|
|
media_folder: "static/images/uploads" # Media files will be stored in the repo under static/images/uploads
|
|
public_folder: "/images/uploads" # The src attribute for uploaded media will begin with /images/uploads
|
|
slug:
|
|
encoding: "unicode"
|
|
clean_accents: true
|
|
sanitize_replacement: "_"
|
|
collections:
|
|
- name: "blog" # Used in routes, e.g., /admin/collections/blog
|
|
label: "Blog" # Used in the UI
|
|
folder: "content/posts" # The path to the folder where the documents are stored
|
|
create: true # Allow users to create new documents in this collection
|
|
format: "frontmatter"
|
|
slug: "{{year}}-{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md
|
|
fields: # The fields for each document, usually in front matter
|
|
- { label: "Title", name: "title", widget: "string" }
|
|
- {
|
|
label: "Date",
|
|
name: "date",
|
|
widget: "datetime",
|
|
date_format: "YYYY-MM-DD",
|
|
time_format: "HH:mm",
|
|
preview: false,
|
|
}
|
|
- {
|
|
label: "Last Mod Date",
|
|
name: "lastmod",
|
|
widget: "datetime",
|
|
date_format: "YYYY-MM-DD",
|
|
time_format: "HH:mm",
|
|
preview: false,
|
|
required: false,
|
|
}
|
|
- {
|
|
label: "Featured Image",
|
|
name: "cover",
|
|
widget: "image",
|
|
required: false,
|
|
}
|
|
- { label: "Description", name: "description", widget: "text" }
|
|
- { label: "Draft", name: "draft", widget: "boolean", default: false }
|
|
- { label: "Categories", name: "categories", widget: "list" }
|
|
- { label: "Tags", name: "tags", widget: "list" }
|
|
- { label: "Body", name: "body", widget: "markdown" }
|