|
| 1 | +```ts |
| 2 | +export interface ListedSinglePage { |
| 3 | + contributors: Array<{ // 页面的贡献者集合 |
| 4 | + avatar: string; // 贡献者头像 |
| 5 | + displayName: string; // 贡献者名称 |
| 6 | + name: string; // 贡献者唯一标识 |
| 7 | + }>; |
| 8 | + owner: { // 页面的作者信息 |
| 9 | + avatar: string; // 作者头像 |
| 10 | + displayName: string; // 作者名称 |
| 11 | + name: string; // 作者唯一标识 |
| 12 | + }; |
| 13 | + page: { // 页面信息 |
| 14 | + apiVersion: "content.halo.run/v1alpha1"; |
| 15 | + kind: "SinglePage"; |
| 16 | + metadata: { |
| 17 | + annotations: {}; |
| 18 | + creationTimestamp: string; |
| 19 | + labels: {}; |
| 20 | + name: string; // 页面的唯一标识 |
| 21 | + version: number; |
| 22 | + }; |
| 23 | + spec: { |
| 24 | + allowComment: boolean; // 是否允许评论 |
| 25 | + baseSnapshot: string; // 内容基础快照 |
| 26 | + cover: string; // 页面封面图 |
| 27 | + deleted: boolean; // 是否已删除 |
| 28 | + excerpt: { // 页面摘要 |
| 29 | + autoGenerate: boolean; // 是否自动生成 |
| 30 | + raw: string; // 摘要内容 |
| 31 | + }; |
| 32 | + headSnapshot: string; // 内容最新快照 |
| 33 | + htmlMetas: Array<{}>; |
| 34 | + owner: string; // 页面作者的唯一标识 |
| 35 | + pinned: boolean; // 是否置顶 |
| 36 | + priority: number; // 页面优先级 |
| 37 | + publish: boolean; // 是否发布 |
| 38 | + publishTime: string; // 发布时间 |
| 39 | + releaseSnapshot: string; // 已发布的内容快照 |
| 40 | + slug: string; // 页面别名 |
| 41 | + template: string; // 页面渲染模板 |
| 42 | + title: string; // 页面标题 |
| 43 | + visible: string; // 页面可见性 |
| 44 | + }; |
| 45 | + status: { |
| 46 | + commentsCount: number; // 页面评论总数 |
| 47 | + conditions: Array<{ |
| 48 | + lastTransitionTime: string; |
| 49 | + message: string; |
| 50 | + reason: string; |
| 51 | + status: string; |
| 52 | + type: string; |
| 53 | + }>; |
| 54 | + contributors: Array<string>; |
| 55 | + excerpt: string; // 最终的页面摘要,根据是否自动生成计算 |
| 56 | + inProgress: boolean; // 是否有未发布的内容 |
| 57 | + lastModifyTime: string; // 页面最后修改时间 |
| 58 | + permalink: string; // 页面的永久链接 |
| 59 | + phase: string; |
| 60 | + }; |
| 61 | + }; |
| 62 | + stats: { |
| 63 | + approvedComment: number; // 已审核的评论数 |
| 64 | + totalComment: number; // 评论总数 |
| 65 | + upvote: number; // 点赞数 |
| 66 | + visit: number; // 访问数 |
| 67 | + }; |
| 68 | +} |
| 69 | + |
| 70 | +``` |
0 commit comments