From 307152cdba944f881c9adc5cc5dc2e2ce19a4f14 Mon Sep 17 00:00:00 2001 From: pengzhanbo Date: Sat, 29 Jun 2024 00:40:43 +0800 Subject: [PATCH] docs: update docs --- docs/changelog.md | 2 +- docs/contributing.md | 2 +- docs/demos.md | 2 +- docs/notes/theme/config/frontmatter/post.md | 11 ++++++++++- docs/notes/theme/guide/博客.md | 16 ++++++++-------- docs/sponsor.md | 2 +- 6 files changed, 22 insertions(+), 13 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index f21c3432..627f9947 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -3,7 +3,7 @@ title: Changelog author: pengzhanbo createTime: 2024/03/13 21:15:50 permalink: /changelog/ -article: false +draft: false aside: false externalLinkIcon: false readingTime: false diff --git a/docs/contributing.md b/docs/contributing.md index e8cd1403..f7bdb93c 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -3,7 +3,7 @@ title: 贡献指南 author: pengzhanbo createTime: 2024/03/13 21:27:45 permalink: /contributing/ -article: false +draft: false externalLinkIcon: false readingTime: false editLink: false diff --git a/docs/demos.md b/docs/demos.md index 2757f529..c43967db 100644 --- a/docs/demos.md +++ b/docs/demos.md @@ -6,7 +6,7 @@ permalink: /demos/ readingTime: false prev: false next: false -article: false +draft: false externalLink: false docs: - diff --git a/docs/notes/theme/config/frontmatter/post.md b/docs/notes/theme/config/frontmatter/post.md index 9b48178e..c6ef64fb 100644 --- a/docs/notes/theme/config/frontmatter/post.md +++ b/docs/notes/theme/config/frontmatter/post.md @@ -31,13 +31,22 @@ tags: 如果为 `number` ,则数字越大,文章置顶的位置越靠前。 -### article +### article - 类型: `boolean` - 默认值: `true` 是否在文章列表中,显示当前文章。 +由于该字段 表达的语义不明,已弃用,改为使用 `draft` + +### draft + +- 类型: `boolean` +- 默认值: `false` + +标记文章是否为草稿。被标记为草稿的文章,不会出现在 博客文章列表页中。 + ### tags - 类型: `string[]` diff --git a/docs/notes/theme/guide/博客.md b/docs/notes/theme/guide/博客.md index d99fa438..745a3193 100644 --- a/docs/notes/theme/guide/博客.md +++ b/docs/notes/theme/guide/博客.md @@ -80,14 +80,14 @@ tags: 以下是在 博客文章中可用的 `frontmatter` 属性。 -| 属性 | 类型 | 默认值 | 说明 | -| ---------- | ------------------- | -------------------------- | -------------------- | -| title | `string` | 默认自动填入文件名 | 文章标题 | -| createTime | `string` | 当前时间 | 文章创建时间 | -| author | `string` | 默认自动填入 `avatar.name` | 文章作者 | -| tags | `string[]` | `[]` | 文章标签 | -| sticky | `boolean \| number` | false | 是否置顶, 如果为数字,则数字越大,置顶越靠前 | -| article | `boolean` | true | 是否在列表页中显示 | +| 属性 | 类型 | 默认值 | 说明 | +| ---------- | ------------------- | --------------------------- | -------------------------------------------- | +| title | `string` | 默认自动填入文件名 | 文章标题 | +| createTime | `string` | 当前时间 | 文章创建时间 | +| author | `string` | 默认自动填入 `profile.name` | 文章作者 | +| tags | `string[]` | `[]` | 文章标签 | +| sticky | `boolean \| number` | false | 是否置顶, 如果为数字,则数字越大,置顶越靠前 | +| draft | `boolean` | false | 是否为草稿,草稿文章不会被展示 | ## 文章摘要 diff --git a/docs/sponsor.md b/docs/sponsor.md index 6a0b73b6..ec539d61 100644 --- a/docs/sponsor.md +++ b/docs/sponsor.md @@ -3,7 +3,7 @@ title: 喝杯奶茶 author: pengzhanbo createTime: 2024/04/18 18:03:50 permalink: /sponsor/ -article: false +draft: false aside: false readingTime: false ---