settings_schema.json
Baklib
发布于:2024-07-07
文件内容
[
{
"name": "theme_info",
"theme_name": "daisy_wiki",
"theme_label": "t:theme_label",
"theme_version": "1.0.0",
"theme_scope": "wiki",
"theme_author": "Baklib",
"theme_description": "t:theme_description",
"theme_documentation_url": "https://help.baklib.cn/themes/daisy-wiki",
"theme_support_url": "https://help.baklib.cn/themes/daisy-wiki/settings",
"theme_thumb_url": "images/theme/thumb.png",
"theme_preview_images": [
"images/theme/index.png",
"images/theme/index-documentation.png",
"images/theme/index-portal.png",
"images/theme/page-channel.png",
"images/theme/page.png"
],
"theme_languages": [
{
"name": "中文简体",
"value": "zh-CN"
},
{
"name": "English",
"value": "en-US"
},
{
"name": "Germany",
"value": "de"
},
{
"name": "France",
"value": "fr"
}
],
"recommendations": {
"color_schemas": {
"fashion": {
"name": "时尚",
"colors": {
"--theme-color-primary": "#0d9488",
"--theme-color-secondary": "#ea580c",
"--theme-color-accent": "#AAAAAA",
"--theme-color-info": "#2196F3",
"--theme-color-success": "#4CAF50",
"--theme-color-warning": "#FFC107"
}
},
"old_school": {
"name": "复古",
"colors": {
"--theme-color-primary": "#9C27B0",
"--theme-color-secondary": "#673AB7",
"--theme-color-accent": "#AAAAAA",
"--theme-color-info": "#418CC8",
"--theme-color-success": "#29B52F",
"--theme-color-warning": "#FFC107"
}
}
}
}
},
{
"name": "t:settings_schema.generic.name",
"settings": [
{
"id": "is_allow_published_at",
"type": "checkbox",
"label": "文章内是否展示发布日期",
"default": true
},
{
"id": "is_allow_author",
"type": "checkbox",
"label": "文章内是否展示作者",
"default": true
}
]
},
{
"name": "t:settings_schema.generic.head_title",
"settings": [
{
"id": "head_html",
"type": "html",
"label": "t:settings_schema.generic.settings.head_html.label",
"info": "t:settings_schema.generic.settings.head_html.info",
"rows": 10,
"placeholder": "t:settings_schema.generic.settings.head_html.placeholder"
}
]
}
]
文件说明
加“*”的为必填项
属性名称 | 默认值 | 说明 |
---|---|---|
*name | theme_info | 此属性的值必须是 |
*theme_name | daisy_wiki | 主题的名称。为字母、数字、下横线的组合。 |
*theme_version | 1.0.0 | 自定义的主题的版本号,通过增加版本号告之平台是否有更新。 |
*theme_scope | wiki | 主题的应用范围,取值范围:' |
*theme_author | Baklib | 作者 |
*theme_label | Daisy Wiki | 标题 |
*theme_description | For feature-rich product user manuals | 描述 |
theme_documentation_url | https://dev.baklib.cn/themes/daisy-wiki | 主题模板教程URL |
theme_support_url | https://dev.baklib.cn/themes/daisy-wiki | 主题模板支持 URL |
theme_thumb_url | images/theme/thumb.png | 缩略图地址 |
theme_preview_images | ['images/theme/index.png'] | 预览图,数组 |
theme_languages | [] | 多语言支持 |
color_schemas | [] | 默认主题颜色配置 |
settings | [] | 站点动态变量设置 |
特别提示
settings 中定义了模板站点的全局变量,全局变量可在站点的任何模板中通过 site
对象调用。每个变量的定义格式为:
{
"id": "is_allow_published_at",
"type": "checkbox",
"label": "文章内是否展示发布日期",
"default": true
},
在模板中调用该变量的方法为:
site.settings.is_allow_published_at