mirror of
https://github.com/halo-dev/docs.git
synced 2025-10-22 02:45:28 +00:00
docs: update example of theme manifest file (#338)
更新主题开发中的 theme.yaml 示例。 Ref https://github.com/halo-dev/halo/issues/5721 ```release-note None ```
This commit is contained in:
@@ -15,11 +15,11 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
displayName: 示例主题
|
displayName: 示例主题
|
||||||
author:
|
author:
|
||||||
name: halo-dev
|
name: Halo
|
||||||
website: https://halo.run
|
website: https://www.halo.run
|
||||||
description: 一个示例主题
|
description: 一个示例主题
|
||||||
logo: https://halo.run/logo
|
logo: https://www.halo.run/logo
|
||||||
website: https://github.com/halo-sigs/theme-foo
|
homepage: https://github.com/halo-sigs/theme-foo
|
||||||
repo: https://github.com/halo-sigs/theme-foo.git
|
repo: https://github.com/halo-sigs/theme-foo.git
|
||||||
settingName: "theme-foo-setting"
|
settingName: "theme-foo-setting"
|
||||||
configMapName: "theme-foo-configMap"
|
configMapName: "theme-foo-configMap"
|
||||||
@@ -40,28 +40,32 @@ spec:
|
|||||||
screenshot:
|
screenshot:
|
||||||
file: page_about.html
|
file: page_about.html
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
require: 2.0.0
|
requires: 2.0.0
|
||||||
|
license:
|
||||||
|
- name: "GPL-3.0"
|
||||||
|
url: "https://github.com/halo-sigs/theme-foo/blob/main/LICENSE"
|
||||||
```
|
```
|
||||||
|
|
||||||
## 字段详解
|
## 字段详解
|
||||||
|
|
||||||
| 字段 | 描述 | 是否必填 |
|
| 字段 | 描述 | 是否必填 |
|
||||||
| ------------------------------- | ----------------------------------------------------------------------------- | -------- |
|
|---------------------------------|---------------------------------------------------------------------------------------------|---------|
|
||||||
| `metadata.name` | 主题的唯一标识 | 是 |
|
| `metadata.name` | 主题的唯一标识 | 是 |
|
||||||
| `spec.displayName` | 显示名称 | 是 |
|
| `spec.displayName` | 显示名称 | 是 |
|
||||||
| `spec.author.name` | 作者名称 | 否 |
|
| `spec.author.name` | 作者名称 | 否 |
|
||||||
| `spec.author.website` | 作者网站 | 否 |
|
| `spec.author.website` | 作者网站 | 否 |
|
||||||
| `spec.description` | 主题描述 | 否 |
|
| `spec.description` | 主题描述 | 否 |
|
||||||
| `spec.logo` | 主题 Logo | 否 |
|
| `spec.logo` | 主题 Logo | 否 |
|
||||||
| `spec.website` | 主题网站 | 否 |
|
| `spec.homepage` | 主题网站 | 否 |
|
||||||
| `spec.repo` | 主题托管地址 | 否 |
|
| `spec.repo` | 主题代码托管地址 | 否 |
|
||||||
| `spec.settingName` | 设置表单定义的名称,需要同时创建对应的 `settings.yaml` 文件 | 否 |
|
| `spec.settingName` | 设置表单定义的名称,需要同时创建对应的 `settings.yaml` 文件 | 否 |
|
||||||
| `spec.configMapName` | 设置持久化配置的 ConfigMap 名称 | 否 |
|
| `spec.configMapName` | 设置持久化配置的 ConfigMap 名称 | 否 |
|
||||||
| `spec.customTemplates.post` | 文章的自定义模板配置,详细文档可查阅 [模板路由](./template-route-mapping#custom-templates) | 否 |
|
| `spec.customTemplates.post` | 文章的自定义模板配置,详细文档可查阅 [模板路由](./template-route-mapping#custom-templates) | 否 |
|
||||||
| `spec.customTemplates.category` | 分类的自定义模板配置,详细文档可查阅 [模板路由](./template-route-mapping#custom-templates) | 否 |
|
| `spec.customTemplates.category` | 分类的自定义模板配置,详细文档可查阅 [模板路由](./template-route-mapping#custom-templates) | 否 |
|
||||||
| `spec.customTemplates.page` | 独立页面的自定义模板配置,详细文档可查阅 [模板路由](./template-route-mapping#custom-templates) | 否 |
|
| `spec.customTemplates.page` | 独立页面的自定义模板配置,详细文档可查阅 [模板路由](./template-route-mapping#custom-templates) | 否 |
|
||||||
| `spec.version` | 主题版本 | 是 |
|
| `spec.version` | 主题版本 | 是 |
|
||||||
| `spec.require` | 所需 Halo 的运行版本 | 是 |
|
| `spec.requires` | 所需 Halo 的运行版本 | 是 |
|
||||||
|
| `spec.license` | 协议 | 否 |
|
||||||
|
|
||||||
## 更新配置
|
## 更新配置
|
||||||
|
|
||||||
|
@@ -21,6 +21,7 @@ Halo 在本地开发环境的运行可参考[开发环境运行](../core/run.md)
|
|||||||
```
|
```
|
||||||
|
|
||||||
- 使用 Docker 运行时,需要添加 `SPRING_THYMELEAF_CACHE=false` 的环境变量。
|
- 使用 Docker 运行时,需要添加 `SPRING_THYMELEAF_CACHE=false` 的环境变量。
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
## 新建一个主题
|
## 新建一个主题
|
||||||
@@ -35,16 +36,19 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
displayName: 示例主题
|
displayName: 示例主题
|
||||||
author:
|
author:
|
||||||
name: halo-dev
|
name: Halo
|
||||||
website: https://halo.run
|
website: https://www.halo.run
|
||||||
description: 一个示例主题
|
description: 一个示例主题
|
||||||
logo: https://halo.run/logo
|
logo: https://www.halo.run/logo
|
||||||
website: https://github.com/halo-sigs/theme-foo
|
homepage: https://github.com/halo-sigs/theme-foo
|
||||||
repo: https://github.com/halo-sigs/theme-foo.git
|
repo: https://github.com/halo-sigs/theme-foo.git
|
||||||
settingName: "theme-foo-setting"
|
settingName: "theme-foo-setting"
|
||||||
configMapName: "theme-foo-configMap"
|
configMapName: "theme-foo-configMap"
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
require: 2.0.0
|
requires: 2.0.0
|
||||||
|
license:
|
||||||
|
- name: "GPL-3.0"
|
||||||
|
url: "https://github.com/halo-sigs/theme-foo/blob/main/LICENSE"
|
||||||
```
|
```
|
||||||
|
|
||||||
:::info 提示
|
:::info 提示
|
||||||
|
@@ -23,16 +23,19 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
displayName: 示例主题
|
displayName: 示例主题
|
||||||
author:
|
author:
|
||||||
name: halo-dev
|
name: Halo
|
||||||
website: https://halo.run
|
website: https://www.halo.run
|
||||||
description: 一个示例主题
|
description: 一个示例主题
|
||||||
logo: https://halo.run/logo
|
logo: https://www.halo.run/logo
|
||||||
website: https://github.com/halo-sigs/theme-foo
|
homepage: https://github.com/halo-sigs/theme-foo
|
||||||
repo: https://github.com/halo-sigs/theme-foo.git
|
repo: https://github.com/halo-sigs/theme-foo.git
|
||||||
settingName: "theme-foo-setting"
|
settingName: "theme-foo-setting"
|
||||||
configMapName: "theme-foo-configMap"
|
configMapName: "theme-foo-configMap"
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
require: 2.0.0
|
requires: 2.0.0
|
||||||
|
license:
|
||||||
|
- name: "GPL-3.0"
|
||||||
|
url: "https://github.com/halo-sigs/theme-foo/blob/main/LICENSE"
|
||||||
```
|
```
|
||||||
|
|
||||||
:::tip
|
:::tip
|
||||||
|
@@ -15,11 +15,11 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
displayName: 示例主题
|
displayName: 示例主题
|
||||||
author:
|
author:
|
||||||
name: halo-dev
|
name: Halo
|
||||||
website: https://halo.run
|
website: https://www.halo.run
|
||||||
description: 一个示例主题
|
description: 一个示例主题
|
||||||
logo: https://halo.run/logo
|
logo: https://www.halo.run/logo
|
||||||
website: https://github.com/halo-sigs/theme-foo
|
homepage: https://github.com/halo-sigs/theme-foo
|
||||||
repo: https://github.com/halo-sigs/theme-foo.git
|
repo: https://github.com/halo-sigs/theme-foo.git
|
||||||
settingName: "theme-foo-setting"
|
settingName: "theme-foo-setting"
|
||||||
configMapName: "theme-foo-configMap"
|
configMapName: "theme-foo-configMap"
|
||||||
@@ -40,28 +40,32 @@ spec:
|
|||||||
screenshot:
|
screenshot:
|
||||||
file: page_about.html
|
file: page_about.html
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
require: 2.0.0
|
requires: 2.0.0
|
||||||
|
license:
|
||||||
|
- name: "GPL-3.0"
|
||||||
|
url: "https://github.com/halo-sigs/theme-foo/blob/main/LICENSE"
|
||||||
```
|
```
|
||||||
|
|
||||||
## 字段详解
|
## 字段详解
|
||||||
|
|
||||||
| 字段 | 描述 | 是否必填 |
|
| 字段 | 描述 | 是否必填 |
|
||||||
| ------------------------------- | ----------------------------------------------------------------------------- | -------- |
|
|---------------------------------|---------------------------------------------------------------------------------------------|---------|
|
||||||
| `metadata.name` | 主题的唯一标识 | 是 |
|
| `metadata.name` | 主题的唯一标识 | 是 |
|
||||||
| `spec.displayName` | 显示名称 | 是 |
|
| `spec.displayName` | 显示名称 | 是 |
|
||||||
| `spec.author.name` | 作者名称 | 否 |
|
| `spec.author.name` | 作者名称 | 否 |
|
||||||
| `spec.author.website` | 作者网站 | 否 |
|
| `spec.author.website` | 作者网站 | 否 |
|
||||||
| `spec.description` | 主题描述 | 否 |
|
| `spec.description` | 主题描述 | 否 |
|
||||||
| `spec.logo` | 主题 Logo | 否 |
|
| `spec.logo` | 主题 Logo | 否 |
|
||||||
| `spec.website` | 主题网站 | 否 |
|
| `spec.homepage` | 主题网站 | 否 |
|
||||||
| `spec.repo` | 主题托管地址 | 否 |
|
| `spec.repo` | 主题代码托管地址 | 否 |
|
||||||
| `spec.settingName` | 设置表单定义的名称,需要同时创建对应的 `settings.yaml` 文件 | 否 |
|
| `spec.settingName` | 设置表单定义的名称,需要同时创建对应的 `settings.yaml` 文件 | 否 |
|
||||||
| `spec.configMapName` | 设置持久化配置的 ConfigMap 名称 | 否 |
|
| `spec.configMapName` | 设置持久化配置的 ConfigMap 名称 | 否 |
|
||||||
| `spec.customTemplates.post` | 文章的自定义模板配置,详细文档可查阅 [模板路由](./template-route-mapping#custom-templates) | 否 |
|
| `spec.customTemplates.post` | 文章的自定义模板配置,详细文档可查阅 [模板路由](./template-route-mapping#custom-templates) | 否 |
|
||||||
| `spec.customTemplates.category` | 分类的自定义模板配置,详细文档可查阅 [模板路由](./template-route-mapping#custom-templates) | 否 |
|
| `spec.customTemplates.category` | 分类的自定义模板配置,详细文档可查阅 [模板路由](./template-route-mapping#custom-templates) | 否 |
|
||||||
| `spec.customTemplates.page` | 独立页面的自定义模板配置,详细文档可查阅 [模板路由](./template-route-mapping#custom-templates) | 否 |
|
| `spec.customTemplates.page` | 独立页面的自定义模板配置,详细文档可查阅 [模板路由](./template-route-mapping#custom-templates) | 否 |
|
||||||
| `spec.version` | 主题版本 | 是 |
|
| `spec.version` | 主题版本 | 是 |
|
||||||
| `spec.require` | 所需 Halo 的运行版本 | 是 |
|
| `spec.requires` | 所需 Halo 的运行版本 | 是 |
|
||||||
|
| `spec.license` | 协议 | 否 |
|
||||||
|
|
||||||
## 更新配置
|
## 更新配置
|
||||||
|
|
||||||
|
@@ -21,6 +21,7 @@ Halo 在本地开发环境的运行可参考[开发环境运行](../core/run.md)
|
|||||||
```
|
```
|
||||||
|
|
||||||
- 使用 Docker 运行时,需要添加 `SPRING_THYMELEAF_CACHE=false` 的环境变量。
|
- 使用 Docker 运行时,需要添加 `SPRING_THYMELEAF_CACHE=false` 的环境变量。
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
## 新建一个主题
|
## 新建一个主题
|
||||||
@@ -35,16 +36,19 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
displayName: 示例主题
|
displayName: 示例主题
|
||||||
author:
|
author:
|
||||||
name: halo-dev
|
name: Halo
|
||||||
website: https://halo.run
|
website: https://www.halo.run
|
||||||
description: 一个示例主题
|
description: 一个示例主题
|
||||||
logo: https://halo.run/logo
|
logo: https://www.halo.run/logo
|
||||||
website: https://github.com/halo-sigs/theme-foo
|
homepage: https://github.com/halo-sigs/theme-foo
|
||||||
repo: https://github.com/halo-sigs/theme-foo.git
|
repo: https://github.com/halo-sigs/theme-foo.git
|
||||||
settingName: "theme-foo-setting"
|
settingName: "theme-foo-setting"
|
||||||
configMapName: "theme-foo-configMap"
|
configMapName: "theme-foo-configMap"
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
require: 2.0.0
|
requires: 2.0.0
|
||||||
|
license:
|
||||||
|
- name: "GPL-3.0"
|
||||||
|
url: "https://github.com/halo-sigs/theme-foo/blob/main/LICENSE"
|
||||||
```
|
```
|
||||||
|
|
||||||
:::info 提示
|
:::info 提示
|
||||||
|
@@ -23,16 +23,19 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
displayName: 示例主题
|
displayName: 示例主题
|
||||||
author:
|
author:
|
||||||
name: halo-dev
|
name: Halo
|
||||||
website: https://halo.run
|
website: https://www.halo.run
|
||||||
description: 一个示例主题
|
description: 一个示例主题
|
||||||
logo: https://halo.run/logo
|
logo: https://www.halo.run/logo
|
||||||
website: https://github.com/halo-sigs/theme-foo
|
homepage: https://github.com/halo-sigs/theme-foo
|
||||||
repo: https://github.com/halo-sigs/theme-foo.git
|
repo: https://github.com/halo-sigs/theme-foo.git
|
||||||
settingName: "theme-foo-setting"
|
settingName: "theme-foo-setting"
|
||||||
configMapName: "theme-foo-configMap"
|
configMapName: "theme-foo-configMap"
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
require: 2.0.0
|
requires: 2.0.0
|
||||||
|
license:
|
||||||
|
- name: "GPL-3.0"
|
||||||
|
url: "https://github.com/halo-sigs/theme-foo/blob/main/LICENSE"
|
||||||
```
|
```
|
||||||
|
|
||||||
:::tip
|
:::tip
|
||||||
|
Reference in New Issue
Block a user