Skip to content

Commit e820442

Browse files
Update config.yml
1 parent a0d0144 commit e820442

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

static/admin/config.yml

+72
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,75 @@ backend:
33
repo: retrofor/retrofor.github.io # Path to your GitHub repository
44
# optional, defaults to master
55
# branch: main
6+
publish_mode: editorial_workflow
7+
media_folder: "static/img/post" # 存放图片的文件夹
8+
public_folder: "/img/post" # 上传图片的src属性会以该路径开头
9+
# 以下是我的Collections内容,如需要请根据自己的头文件内容自定义
10+
collections:
11+
- name: "post" # 定义该collection的路径
12+
label: "Blog" # 后台显示的名字
13+
folder: "content/blog/2018" # 文章存放文件夹
14+
create: true # 允许创建新文件
15+
slug: "{{slug}}" # 文件名字模版,{{slug}} 取自title
16+
fields: # 定义front matter的显示与数据类型
17+
- { label: "Title", name: "title", widget: "string" }
18+
- {
19+
label: "Author",
20+
name: "author",
21+
widget: "string",
22+
default: "WithdewHua",
23+
}
24+
- { label: "Type", name: "type", widget: "string", default: "post" }
25+
- { label: "Categories", name: "categories", widget: "list" }
26+
- { label: "Tags", name: "tags", widget: "list" }
27+
- { label: "Series", name: "series", widget: "list", required: false }
28+
- { label: "Publish Date", name: "date", widget: "datetime" }
29+
- {
30+
label: "Lastmod",
31+
name: "lastmod",
32+
widget: "date",
33+
default: "",
34+
required: false,
35+
format: "YYYY-MM-DD",
36+
}
37+
- {
38+
label: "Description",
39+
name: "description",
40+
widget: "text",
41+
required: false,
42+
}
43+
- {
44+
label: "Featured Image",
45+
name: "featured",
46+
widget: "image",
47+
required: false,
48+
}
49+
- {
50+
label: "Featured Alt",
51+
name: "featuredalt",
52+
widget: "string",
53+
required: false,
54+
}
55+
- {
56+
label: "Featured Path",
57+
name: "featuredpath",
58+
widget: "string",
59+
default: "img/post",
60+
required: false,
61+
}
62+
- { label: "Slug", name: "slug", widget: "string", required: false }
63+
- {
64+
label: "Draft",
65+
name: "draft",
66+
widget: "boolean",
67+
default: false,
68+
required: false,
69+
}
70+
- {
71+
label: "Show TOC",
72+
name: "showtoc",
73+
widget: "boolean",
74+
default: true,
75+
required: false,
76+
}
77+
- { label: "Post Content", name: "body", widget: "markdown" }

0 commit comments

Comments
 (0)