From 6d1f6aafd44eae3179a68ee31f3d19ad900a94af Mon Sep 17 00:00:00 2001 From: laplacetw Date: Thu, 19 Oct 2023 20:54:13 +0800 Subject: [PATCH] bump to vitepress@1.0.0-rc.22 --- .vitepress/config.ts | 12 +- .vitepress/theme/components/Archives.vue | 5 +- .vitepress/theme/components/Category.vue | 5 +- .vitepress/theme/components/Home.vue | 6 +- .vitepress/theme/components/Pagination.vue | 12 +- .vitepress/theme/components/PostFooter.vue | 10 +- .vitepress/theme/components/Tags.vue | 5 +- CHANGELOG.md | 9 +- package.json | 4 +- pnpm-lock.yaml | 177 ++++++++++++--------- 10 files changed, 139 insertions(+), 106 deletions(-) diff --git a/.vitepress/config.ts b/.vitepress/config.ts index 6aeeb78..14d65cc 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -21,7 +21,17 @@ export default defineConfig({ nav: themeConfig.nav, logo: themeConfig.logo, socialLinks: themeConfig.socialLinks, - search: { provider: 'local' }, + search: { + provider: 'local', + options: { + detailedView: true, + _render: (src, env, md) => { + const html = md.render(src, env) + if (env.frontmatter?.search === false) return '' + return env.frontmatter?.title ? md.render('# ' + env.frontmatter?.title) + html : html + }, + }, + }, footer: themeConfig.footer }, srcExclude: ['README.md', 'README_CH.md', 'CHANGELOG.md'], diff --git a/.vitepress/theme/components/Archives.vue b/.vitepress/theme/components/Archives.vue index 36d9fc0..ce47b57 100644 --- a/.vitepress/theme/components/Archives.vue +++ b/.vitepress/theme/components/Archives.vue @@ -1,9 +1,8 @@ @@ -16,7 +15,7 @@ const years = Object.keys(archives).sort().reverse()

{{ year }}

+ class='decoration-2 hover:underline' :href='withBase(post.url)'>
{{ post.title }}
diff --git a/.vitepress/theme/components/Category.vue b/.vitepress/theme/components/Category.vue index 6b63455..601b257 100644 --- a/.vitepress/theme/components/Category.vue +++ b/.vitepress/theme/components/Category.vue @@ -1,10 +1,9 @@