docs: update documentation for Halo 2.1 (#162)

为 Halo 2.1 更新文档。

see https://github.com/halo-dev/halo/releases/tag/v2.1.0

/kind documentation

```release-note
None
```
This commit is contained in:
Ryan Wang
2023-01-03 15:56:36 +08:00
committed by GitHub
parent f89f0beadf
commit ef03b0fbfb
83 changed files with 6856 additions and 28 deletions

View File

@@ -0,0 +1,33 @@
```json title="CategoryTreeVo"
{
"metadata": {
"name": "string", // 唯一标识
"labels": {
"additionalProp1": "string"
},
"annotations": {
"additionalProp1": "string"
},
"creationTimestamp": "2022-11-20T14:18:49.230Z", // 创建时间
},
"spec": {
"displayName": "string", // 显示名称
"slug": "string", // 别名,通常用于生成 status.permalink
"description": "string", // 描述
"cover": "string", // 封面图
"template": "string", // 自定义渲染模板名称
"priority": 0, // 排序字段
"children": [ // 下级分类,分类的 metadata.name 集合
"string"
]
},
"status": {
"permalink": "string", // 固定链接
"postCount": 0, // 文章数
"visiblePostCount": 0 // 已发布文章数
},
"children": "List<#CategoryTreeVo>", // 下级分类CategoryTreeVo 的集合
"parentName": "string",
"postCount": 0
}
```

View File

@@ -0,0 +1,31 @@
```json title="CategoryVo"
{
"metadata": {
"name": "string", // 唯一标识
"labels": {
"additionalProp1": "string"
},
"annotations": {
"additionalProp1": "string"
},
"creationTimestamp": "2022-11-20T13:06:38.512Z", // 创建时间
},
"spec": {
"displayName": "string", // 显示名称
"slug": "string", // 别名,通常用于生成 status.permalink
"description": "string", // 描述
"cover": "string", // 封面图
"template": "string", // 自定义渲染模板名称
"priority": 0, // 排序字段
"children": [ // 下级分类,分类的 metadata.name 集合
"string"
]
},
"status": {
"permalink": "string", // 固定链接
"postCount": 0, // 文章数
"visiblePostCount": 0 // 已发布文章数
},
"postCount": 0
}
```

View File

@@ -0,0 +1,53 @@
```json title="CommentVo"
{
"metadata": {
"name": "string", // 唯一标识
"labels": {
"additionalProp1": "string"
},
"annotations": {
"additionalProp1": "string"
},
"creationTimestamp": "2022-11-20T12:16:19.788Z" // 创建时间
},
"spec": {
"raw": "string", // 原始文本,一般用于给编辑器使用
"content": "string", // 最终渲染的文本
"owner": { // 创建者关联
"kind": "string",
"name": "string",
"displayName": "string",
"annotations": {
"additionalProp1": "string"
}
},
"userAgent": "string", // 评论者 UserAgent 信息
"ipAddress": "string", // 评论者 IP 地址
"priority": 0, // 排序字段
"top": false, // 是否置顶
"allowNotification": true, // 是否允许通知
"approved": false,
"hidden": false,
"subjectRef": { // 引用关联,比如文章、自定义页面
"group": "string",
"version": "string",
"kind": "string",
"name": "string"
},
"lastReadTime": "2022-11-20T12:16:19.788Z"
},
"status": {
"lastReplyTime": "2022-11-20T12:16:19.788Z",
"replyCount": 0, // 回复数量
"unreadReplyCount": 0,
"hasNewReply": true // 是否有新回复
},
"owner": { // 创建者信息
"kind": "string",
"name": "string",
"displayName": "string",
"avatar": "string",
"email": "string"
}
}
```

View File

@@ -0,0 +1,6 @@
```json title="ContentVo"
{
"raw": "string", // 原始文本,一般用于给编辑器使用
"content": "string" // 最终渲染的文本
}
```

View File

@@ -0,0 +1,8 @@
```json title="Contributor"
{
"name": "string", // 用户名
"displayName": "string", // 显示名称
"avatar": "string", // 头像
"bio": "string" // 描述
}
```

View File

@@ -0,0 +1,64 @@
```json title="ListedPostVo"
{
"metadata": {
"name": "string", // 唯一标识
"labels": {
"additionalProp1": "string"
},
"annotations": {
"additionalProp1": "string"
},
"creationTimestamp": "2022-11-20T13:06:38.505Z", // 创建时间
},
"spec": {
"title": "string", // 标题
"slug": "string", // 别名,通常用于生成 status.permalink
"releaseSnapshot": "string",
"headSnapshot": "string",
"baseSnapshot": "string",
"owner": "string", // 创建者名称,即 Contributor 的 metadata.name非显示名称
"template": "string", // 自定义渲染模板
"cover": "string", // 封面图
"deleted": false,
"publish": false,
"publishTime": "2022-11-20T13:06:38.505Z", // 发布时间
"pinned": false, // 是否置顶
"allowComment": true, // 是否允许评论
"visible": "PUBLIC",
"priority": 0,
"excerpt": {
"autoGenerate": true, // 是否自动生成摘要
"raw": "string" // 摘要内容
},
"categories": [ // 分类的名称集合,即 Category 的 metadata.name 的集合
"string"
],
"tags": [ // 标签的名称集合,即 Tag 的 metadata.name 的集合
"string"
],
"htmlMetas": [
{
"additionalProp1": "string"
}
]
},
"status": {
"permalink": "string", // 固定链接
"excerpt": "string", // 最终生成的摘要
"inProgress": true,
"commentsCount": 0, // 评论数
"contributors": [ // 贡献者名称Contributor 的 metadata.name 的集合
"string"
]
},
"categories": "List<#CategoryVo>", // 分类的集合
"tags": "List<#TagVo>", // 标签的集合
"contributors": "List<#Contributor>", // 贡献者的集合
"owner": "#Contributor", // 创建者
"stats": {
"visit": 0, // 访问数量
"upvote": 0, // 点赞数量
"comment": 0 // 评论数量
}
}
```

View File

@@ -0,0 +1,56 @@
```json title="ListedSinglePageVo"
{
"metadata": {
"name": "string", // 唯一标识
"labels": {
"additionalProp1": "string"
},
"annotations": {
"additionalProp1": "string"
},
"creationTimestamp": "2022-11-20T14:31:00.876Z" // 创建时间
},
"spec": {
"title": "string", // 标题
"slug": "string", // 别名,通常用于生成 status.permalink
"releaseSnapshot": "string",
"headSnapshot": "string",
"baseSnapshot": "string",
"owner": "string", // 创建者名称,即 Contributor 的 metadata.name非显示名称
"template": "string", // 自定义渲染模板
"cover": "string", // 封面图
"deleted": false,
"publish": false,
"publishTime": "2022-11-20T14:31:00.876Z", // 发布时间
"pinned": false, // 是否置顶
"allowComment": true, // 是否允许评论
"visible": "PUBLIC",
"priority": 0,
"excerpt": {
"autoGenerate": true, // 是否自动生成摘要
"raw": "string" // 摘要内容
},
"htmlMetas": [
{
"additionalProp1": "string"
}
]
},
"status": {
"permalink": "string", // 固定链接
"excerpt": "string", // 最终生成的摘要
"inProgress": true,
"commentsCount": 0, // 评论数
"contributors": [ // 贡献者名称Contributor 的 metadata.name 的集合
"string"
]
},
"stats": {
"visit": 0, // 访问数量
"upvote": 0, // 点赞数量
"comment": 0 // 评论数量
},
"contributors": "List<#Contributor>", // 贡献者的集合
"owner": "#Contributor" // 创建者
}
```

View File

@@ -0,0 +1,34 @@
```json title="MenuItemVo"
{
"metadata": {
"name": "string", // 唯一标识
"labels": {
"additionalProp1": "string"
},
"annotations": {
"additionalProp1": "string"
},
"creationTimestamp": "2022-11-20T14:44:58.984Z", // 创建时间
},
"spec": {
"displayName": "string", // 显示名称,但是不要直接使用这个字段进行显示,最终字段为 status.displayName
"href": "string", // 链接,同样不要直接使用这个字段,最终字段为 status.href
"priority": 0, // 排序字段
"children": [ // 下级菜单项,菜单项的 metadata.name 集合
"string"
],
"targetRef": { // 与其他资源比如文章的关联,一般无需直接使用
"group": "string",
"version": "string",
"kind": "string",
"name": "string"
}
},
"status": {
"displayName": "string", // 显示名称
"href": "string" // 链接
},
"children": "List<#MenuItemVo>", // 下级菜单项MenuItemVo 的集合
"parentName": "string",
}
```

View File

@@ -0,0 +1,21 @@
```json title="MenuVo"
{
"metadata": {
"name": "string", // 唯一标识
"labels": {
"additionalProp1": "string"
},
"annotations": {
"additionalProp1": "string"
},
"creationTimestamp": "2022-11-20T14:44:58.984Z", // 创建时间
},
"spec": {
"displayName": "string", // 显示名称
"menuItems": [ // 菜单的菜单项名称集合,即 MenuItem 的 metadata.name 的集合
"string"
]
},
"menuItems": "List<#MenuItemVo>" // 菜单项的集合
}
```

View File

@@ -0,0 +1,65 @@
```json title="PostVo"
{
"metadata": {
"name": "string", // 唯一标识
"labels": {
"additionalProp1": "string"
},
"annotations": {
"additionalProp1": "string"
},
"creationTimestamp": "2022-11-20T12:45:43.888Z", // 创建时间
},
"spec": {
"title": "string", // 标题
"slug": "string", // 别名,通常用于生成 status.permalink
"releaseSnapshot": "string",
"headSnapshot": "string",
"baseSnapshot": "string",
"owner": "string", // 创建者名称,即 Contributor 的 metadata.name非显示名称
"template": "string", // 自定义渲染模板
"cover": "string", // 封面图
"deleted": false,
"publish": false,
"publishTime": "2022-11-20T13:06:38.505Z", // 发布时间
"pinned": false, // 是否置顶
"allowComment": true, // 是否允许评论
"visible": "PUBLIC",
"priority": 0,
"excerpt": {
"autoGenerate": true, // 是否自动生成摘要
"raw": "string" // 摘要内容
},
"categories": [ // 分类的名称集合,即 Category 的 metadata.name 的集合
"string"
],
"tags": [ // 标签的名称集合,即 Tag 的 metadata.name 的集合
"string"
],
"htmlMetas": [
{
"additionalProp1": "string"
}
]
},
"status": {
"permalink": "string", // 固定链接
"excerpt": "string", // 最终生成的摘要
"inProgress": true,
"commentsCount": 0, // 评论数
"contributors": [ // 贡献者名称Contributor 的 metadata.name 的集合
"string"
]
},
"categories": "List<#CategoryVo>", // 分类的集合
"tags": "List<#TagVo>", // 标签的集合
"contributors": "List<#Contributor>", // 贡献者的集合
"owner": "#Contributor", // 创建者
"stats": {
"visit": 0, // 访问数量
"upvote": 0, // 点赞数量
"comment": 0 // 评论数量
},
"content": "#ContentVo" // 内容
}
```

View File

@@ -0,0 +1,42 @@
```json title="ReplyVo"
{
"metadata": {
"name": "string", // 唯一标识
"labels": {
"additionalProp1": "string"
},
"annotations": {
"additionalProp1": "string"
},
"creationTimestamp": "2022-11-20T12:25:32.357Z" // 创建时间
},
"spec": {
"raw": "string", // 原始文本,一般用于给编辑器使用
"content": "string", // 最终渲染的文本
"owner": { // 创建者关联
"kind": "string",
"name": "string",
"displayName": "string",
"annotations": {
"additionalProp1": "string"
}
},
"userAgent": "string", // 评论者 UserAgent 信息
"ipAddress": "string", // 评论者 IP 地址
"priority": 0, // 排序字段
"top": false, // 是否置顶
"allowNotification": true, // 是否允许通知
"approved": false,
"hidden": false,
"commentName": "string", // 被回复的评论名称,即 Comment 的 metadata.name
"quoteReply": "string" // 被回复的回复名称,即 Reply 的 metadata.name
},
"owner": { // 创建者信息
"kind": "string",
"name": "string",
"displayName": "string",
"avatar": "string",
"email": "string"
}
}
```

View File

@@ -0,0 +1,57 @@
```json title="SinglePageVo"
{
"metadata": {
"name": "string", // 唯一标识
"labels": {
"additionalProp1": "string"
},
"annotations": {
"additionalProp1": "string"
},
"creationTimestamp": "2022-11-20T14:29:44.601Z", // 创建时间
},
"spec": {
"title": "string", // 标题
"slug": "string", // 别名,通常用于生成 status.permalink
"releaseSnapshot": "string",
"headSnapshot": "string",
"baseSnapshot": "string",
"owner": "string", // 创建者名称,即 Contributor 的 metadata.name非显示名称
"template": "string", // 自定义渲染模板
"cover": "string", // 封面图
"deleted": false,
"publish": false,
"publishTime": "2022-11-20T13:06:38.505Z", // 发布时间
"pinned": false, // 是否置顶
"allowComment": true, // 是否允许评论
"visible": "PUBLIC",
"priority": 0,
"excerpt": {
"autoGenerate": true, // 是否自动生成摘要
"raw": "string" // 摘要内容
},
"htmlMetas": [
{
"additionalProp1": "string"
}
]
},
"status": {
"permalink": "string", // 固定链接
"excerpt": "string", // 最终生成的摘要
"inProgress": true,
"commentsCount": 0, // 评论数
"contributors": [ // 贡献者名称Contributor 的 metadata.name 的集合
"string"
]
},
"stats": {
"visit": 0, // 访问数量
"upvote": 0, // 点赞数量
"comment": 0 // 评论数量
},
"contributors": "List<#Contributor>", // 贡献者的集合
"owner": "#Contributor", // 创建者
"content": "#ContentVo" // 内容
}
```

View File

@@ -0,0 +1,26 @@
```json title="TagVo"
{
"metadata": {
"name": "string", // 唯一标识
"labels": {
"additionalProp1": "string"
},
"annotations": {
"additionalProp1": "string"
},
"creationTimestamp": "2022-11-20T13:06:38.512Z", // 创建时间
},
"spec": {
"displayName": "string", // 显示名称
"slug": "string", // 别名,通常用于生成 status.permalink
"color": "#F9fEB1", // 背景颜色
"cover": "string" // 封面图
},
"status": {
"permalink": "string", // 固定链接
"visiblePostCount": 0, // 已发布文章数
"postCount": 0 // 文章数
},
"postCount": 0
}
```