🎈 perf: search

This commit is contained in:
m1m1sha
2024-05-11 08:58:52 +08:00
parent 86aedb8869
commit c6cd271ce4
3 changed files with 32 additions and 8 deletions
+21 -4
View File
@@ -5,9 +5,6 @@ export const cn = defineConfig({
description: '一个简单、安全、去中心化的内网穿透 VPN 组网方案,使用 Rust 语言和 Tokio 框架实现',
themeConfig: {
search: {
provider: 'local',
},
sidebar: [
{
text: '开始',
@@ -59,6 +56,9 @@ export const cn = defineConfig({
prev: '上一页',
next: '下一页',
},
outline: {
label: '页面导航',
},
lastUpdated: {
text: '最后更新于',
formatOptions: {
@@ -72,6 +72,23 @@ export const cn = defineConfig({
darkModeSwitchLabel: '主题',
lightModeSwitchTitle: '切换到浅色模式',
darkModeSwitchTitle: '切换到深色模式',
},
})
export const cnSearch = {
translations: {
button: {
buttonText: '搜索文档',
buttonAriaLabel: '搜索文档',
},
modal: {
noResultsText: '无法找到相关结果',
resetButtonTitle: '清除查询条件',
footer: {
selectText: '选择',
navigateText: '切换',
closeText: '关闭',
},
},
},
}
-3
View File
@@ -5,9 +5,6 @@ export const en = defineConfig({
description: 'a simple, safe and decentralized VPN networking solution implemented with the Rust language and Tokio framework.',
themeConfig: {
search: {
provider: 'local',
},
sidebar: [
{
text: 'Getting Started',
+11 -1
View File
@@ -1,12 +1,22 @@
import { withMermaid } from 'vitepress-plugin-mermaid'
import { en } from './en'
import { cn } from './cn'
import { cn, cnSearch } from './cn'
export default withMermaid({
title: 'EasyTier',
base: '/easytier-doc/',
lastUpdated: true,
themeConfig: {
search: {
provider: 'local',
options: {
locales: {
root: { ...cnSearch },
},
},
},
},
locales: {
root: { label: '简体中文', ...cn },
en: { label: 'English', ...en },