diff --git a/.vitepress/config.mts b/.vitepress/config.mts index 7ad53968..b82c766f 100644 --- a/.vitepress/config.mts +++ b/.vitepress/config.mts @@ -19,6 +19,7 @@ export default defineConfig({ srcExclude: ['SUMMARY.md', 'zh-HK.md', 'zh-CN.md', 'en.md'], srcDir: 'locales', lastUpdated: true, + head: [ [ 'link', @@ -103,7 +104,48 @@ export default defineConfig({ // https://vitepress.dev/reference/default-theme-config themeConfig: { - logo: 'https://assets.lbkrs.com/uploads/d29e591d-0c3d-4def-b837-cd06dfb4d738/whale-logo.svg', + logo: "https://assets.lbkrs.com/uploads/d29e591d-0c3d-4def-b837-cd06dfb4d738/whale-logo.svg", + search: { + provider: "local", + options: { + locales: { + "zh-CN": { + translations: { + button: { + buttonText: "搜索文档", + buttonAriaLabel: "搜索文档", + }, + modal: { + noResultsText: "无法找到相关结果", + resetButtonTitle: "清除查询条件", + footer: { + selectText: "选择", + navigateText: "切换", + closeText: "关闭", + }, + }, + }, + }, + "zh-HK": { + translations: { + button: { + buttonText: "搜尋文件", + buttonAriaLabel: "搜尋文件", + }, + modal: { + noResultsText: "無法找到相關結果", + resetButtonTitle: "清除查詢條件", + footer: { + selectText: "選擇", + navigateText: "切換", + closeText: "關閉", + }, + }, + }, + }, + }, + }, + }, sidebar: { // en: docsSidebarEN, // "zh-CN": docsSidebarZHCN, diff --git a/.vitepress/theme/style.scss b/.vitepress/theme/style.scss index e2f5bbdd..df02f25d 100644 --- a/.vitepress/theme/style.scss +++ b/.vitepress/theme/style.scss @@ -2,8 +2,8 @@ @tailwind components; @tailwind utilities; -/* - .vitepress/theme/custom.css +/* + .vitepress/theme/custom.css https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css */ @@ -170,3 +170,7 @@ ol { font-size: 0.9em; color: var(--vp-c-text-3); } + +.DocSearch-Button{ + border-color: var(--vp-c-divider); +}