diff --git a/docs/.vuepress/notes.ts b/docs/.vuepress/notes.ts index 35cb8773..64627dad 100644 --- a/docs/.vuepress/notes.ts +++ b/docs/.vuepress/notes.ts @@ -116,8 +116,8 @@ export const zhNotes = definePlumeNotesConfig({ { text: 'plugin-netlify-functions', dir: 'netlify-functions', - link: 'plugin-netlify-functions/', - collapsed: false, + link: '/plugins/plugin-netlify-functions/', + collapsed: true, items: [ '介绍', '使用', diff --git a/docs/notes/theme/config/主题配置.md b/docs/notes/theme/config/主题配置.md index 4304398f..7c818f00 100644 --- a/docs/notes/theme/config/主题配置.md +++ b/docs/notes/theme/config/主题配置.md @@ -98,6 +98,12 @@ interface BlogOptions { * @default true */ archives?: boolean + + /** + * 是否启用分类页 + * @default true + */ + categories?: boolean } ``` diff --git a/docs/notes/theme/guide/博客.md b/docs/notes/theme/guide/博客.md index 369c0800..808189c3 100644 --- a/docs/notes/theme/guide/博客.md +++ b/docs/notes/theme/guide/博客.md @@ -110,10 +110,12 @@ title: 标题 这里的内容不会被作为摘要 ``` -## 标签页和归档页 +## 标签页,分类页和归档页 -主题除了自动生成 **博客文章列表页** 以外,还会自动生成 **标签页** 和 **归档页**。 +主题除了自动生成 **博客文章列表页** 以外,还会自动生成 **标签页**,**分类页** 和 **归档页**。 标签页 可以根据 标签 筛选并展示 博客文章。 +分类页 可以根据 原始目录结构 分类展示 博客文章。 + 归档页根据文章的创建时间进行归档。 diff --git a/theme/src/client/components/Blog/VPBlog.vue b/theme/src/client/components/Blog/VPBlog.vue index 4e4dbc92..8909ba82 100644 --- a/theme/src/client/components/Blog/VPBlog.vue +++ b/theme/src/client/components/Blog/VPBlog.vue @@ -4,6 +4,7 @@ import VPBlogArchives from '@theme/Blog/VPBlogArchives.vue' import VPBlogAside from '@theme/Blog/VPBlogAside.vue' import VPBlogExtract from '@theme/Blog/VPBlogExtract.vue' import VPBlogTags from '@theme/Blog/VPBlogTags.vue' +import VPBlogCategories from '@theme/Blog/VPBlogCategories.vue' import VPBlogNav from '@theme/Blog/VPBlogNav.vue' import VPTransitionFadeSlideY from '@theme/VPTransitionFadeSlideY.vue' import { useData } from '../../composables/data.js' @@ -35,6 +36,14 @@ const { theme, page } = useData() + + + +