mirror of https://github.com/halo-dev/halo
perf: refine the extension definition for system setting (#2477)
#### What type of PR is this? /kind improvement /area core /milestone 2.0 #### What this PR does / why we need it: 完善系统设置表单的资源定义。 - 副标题的验证改为取消必填 - 优化主题路由规则显示名称 - 移除暂未实现的用户注册相关设置 - 代码注入设置的文案 #### Which issue(s) this PR fixes: Fixes # #### Special notes for your reviewer: /cc @halo-dev/sig-halo #### Does this PR introduce a user-facing change? ```release-note 完善系统设置表单的资源定义 ```pull/2482/head
parent
11d91712f6
commit
91793a7e03
|
@ -14,56 +14,12 @@ spec:
|
||||||
- $formkit: text
|
- $formkit: text
|
||||||
label: "站点副标题"
|
label: "站点副标题"
|
||||||
name: subtitle
|
name: subtitle
|
||||||
validation: required
|
|
||||||
- $formkit: text
|
- $formkit: text
|
||||||
label: Logo
|
label: Logo
|
||||||
name: logo
|
name: logo
|
||||||
- $formkit: text
|
- $formkit: text
|
||||||
label: Favicon
|
label: Favicon
|
||||||
name: favicon
|
name: favicon
|
||||||
- group: user
|
|
||||||
label: 用户设置
|
|
||||||
formSchema:
|
|
||||||
- $formkit: checkbox
|
|
||||||
label: "是否公开注册"
|
|
||||||
value: false
|
|
||||||
name: allowRegistration
|
|
||||||
validation: required
|
|
||||||
- $formkit: text
|
|
||||||
label: "默认角色"
|
|
||||||
name: defaultRole
|
|
||||||
validation: required
|
|
||||||
- group: routeRules
|
|
||||||
label: 主题模板路由设置
|
|
||||||
formSchema:
|
|
||||||
- $formkit: text
|
|
||||||
label: "分类页路由前缀"
|
|
||||||
value: "categories"
|
|
||||||
name: categories
|
|
||||||
validation: required | alphanumeric
|
|
||||||
- $formkit: text
|
|
||||||
label: "标签页路由前缀"
|
|
||||||
value: "tags"
|
|
||||||
name: tags
|
|
||||||
validation: required | alphanumeric
|
|
||||||
- $formkit: text
|
|
||||||
label: "归档页路由前缀"
|
|
||||||
value: "archives"
|
|
||||||
name: archives
|
|
||||||
validation: required | alphanumeric
|
|
||||||
- $formkit: select
|
|
||||||
label: "文章详情页访问规则"
|
|
||||||
value: "/archives/{slug}"
|
|
||||||
options:
|
|
||||||
- /archives/{slug}
|
|
||||||
- /archives/{name}
|
|
||||||
- /?p={name}
|
|
||||||
- /?p={slug}
|
|
||||||
- /{year:\d{4}}/{slug}
|
|
||||||
- /{year:\d{4}}/{month:\d{2}}/{slug}
|
|
||||||
- /{year:\d{4}}/{month:\d{2}}/{day:\d{2}}/{slug}
|
|
||||||
name: post
|
|
||||||
validation: required
|
|
||||||
- group: post
|
- group: post
|
||||||
label: 文章设置
|
label: 文章设置
|
||||||
formSchema:
|
formSchema:
|
||||||
|
@ -116,18 +72,56 @@ spec:
|
||||||
name: systemUserOnly
|
name: systemUserOnly
|
||||||
value: true
|
value: true
|
||||||
label: "仅允许注册用户评论"
|
label: "仅允许注册用户评论"
|
||||||
|
- group: routeRules
|
||||||
|
label: 主题路由设置
|
||||||
|
formSchema:
|
||||||
|
- $formkit: text
|
||||||
|
label: "分类页路由前缀"
|
||||||
|
value: "categories"
|
||||||
|
name: categories
|
||||||
|
validation: required | alphanumeric
|
||||||
|
- $formkit: text
|
||||||
|
label: "标签页路由前缀"
|
||||||
|
value: "tags"
|
||||||
|
name: tags
|
||||||
|
validation: required | alphanumeric
|
||||||
|
- $formkit: text
|
||||||
|
label: "归档页路由前缀"
|
||||||
|
value: "archives"
|
||||||
|
name: archives
|
||||||
|
validation: required | alphanumeric
|
||||||
|
- $formkit: select
|
||||||
|
label: 文章详情页访问规则
|
||||||
|
value: '/archives/{slug}'
|
||||||
|
options:
|
||||||
|
- label: '/archives/{slug}'
|
||||||
|
value: '/archives/{slug}'
|
||||||
|
- label: '/archives/{name}'
|
||||||
|
value: '/archives/{name}'
|
||||||
|
- label: '/?p={name}'
|
||||||
|
value: '/?p={name}'
|
||||||
|
- label: '/?p={slug}'
|
||||||
|
value: '/?p={slug}'
|
||||||
|
- label: '/{year}/{slug}'
|
||||||
|
value: '/{year:\d{4}}/{slug}'
|
||||||
|
- label: '/{year}/{month}/{slug}'
|
||||||
|
value: '/{year:\d{4}}/{month:\d{2}}/{slug}'
|
||||||
|
- label: '/{year}/{month}/{day}/{slug}'
|
||||||
|
value: '/{year:\d{4}}/{month:\d{2}}/{day:\d{2}}/{slug}'
|
||||||
|
name: post
|
||||||
|
validation: required
|
||||||
- group: codeInjection
|
- group: codeInjection
|
||||||
label: 代码注入
|
label: 代码注入
|
||||||
formSchema:
|
formSchema:
|
||||||
- $formkit: textarea
|
- $formkit: textarea
|
||||||
label: "全局 head"
|
label: "全局 head 标签"
|
||||||
name: globalHead
|
name: globalHead
|
||||||
help: "插入代码到所有页面的 head 标签部分"
|
help: "注入代码到所有页面的 head 标签部分"
|
||||||
- $formkit: textarea
|
- $formkit: textarea
|
||||||
label: "内容页 head"
|
label: "内容页 head 标签"
|
||||||
name: contentHead
|
name: contentHead
|
||||||
help: "插入代码到文章页面和自定义页面的 head 标签部分"
|
help: "注入代码到文章页面和自定义页面的 head 标签部分"
|
||||||
- $formkit: textarea
|
- $formkit: textarea
|
||||||
label: "页脚"
|
label: "页脚"
|
||||||
name: footer
|
name: footer
|
||||||
help: "插入代码到所有页面的页脚部分"
|
help: "注入代码到所有页面的页脚部分"
|
||||||
|
|
Loading…
Reference in New Issue