mirror of
https://github.com/snowykami/mbcp.git
synced 2024-11-25 07:45:03 +08:00
🔥 新增搜索功能
This commit is contained in:
parent
25a6062837
commit
8eca5e2c22
@ -1,3 +1,5 @@
|
||||
// 共有配置项,导入index用
|
||||
|
||||
import {defineConfig} from 'vitepress'
|
||||
import {generateSidebar} from 'vitepress-sidebar';
|
||||
import {zh} from "./zh";
|
||||
@ -71,11 +73,82 @@ export const common = defineConfig({
|
||||
socialLinks: [
|
||||
{icon: 'github', link: 'https://github.com/snowykami/mbcp'}
|
||||
],
|
||||
outline: [2, 6]
|
||||
search: {
|
||||
provider: 'local',
|
||||
options: {
|
||||
locales: {
|
||||
root: {
|
||||
translations: {
|
||||
button: {
|
||||
buttonText: '搜索文档',
|
||||
buttonAriaLabel: '打开搜索框',
|
||||
},
|
||||
modal: {
|
||||
noResultsText: '没有找到搜索结果',
|
||||
resetButtonTitle: '清除查询条件',
|
||||
footer: {
|
||||
selectText: '选择',
|
||||
navigateText: '切换',
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
en: {
|
||||
translations: {
|
||||
button: {
|
||||
buttonText: 'Search',
|
||||
buttonAriaLabel: 'Search',
|
||||
},
|
||||
modal: {
|
||||
noResultsText: 'No results found',
|
||||
resetButtonTitle: 'Reset search query',
|
||||
footer: {
|
||||
selectText: 'Select',
|
||||
navigateText: 'Navigate',
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
zht: {
|
||||
translations: {
|
||||
button: {
|
||||
buttonText: '搜索文檔',
|
||||
buttonAriaLabel: '打開搜索框',
|
||||
},
|
||||
modal: {
|
||||
noResultsText: '沒有找到搜索結果',
|
||||
resetButtonTitle: '清除查詢條件',
|
||||
footer: {
|
||||
selectText: '選擇',
|
||||
navigateText: '切換',
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
ja: {
|
||||
translations: {
|
||||
button: {
|
||||
buttonText: '検索',
|
||||
buttonAriaLabel: '検索を開く',
|
||||
},
|
||||
modal: {
|
||||
noResultsText: '検索結果が見つかりません',
|
||||
resetButtonTitle: 'リセット',
|
||||
footer: {
|
||||
selectText: '選択',
|
||||
navigateText: '移動',
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
sitemap: {
|
||||
hostname: 'https://mbcp.sfkm.me'
|
||||
},
|
||||
lastUpdated: true,
|
||||
locales: {
|
||||
root: {label: "简体中文", ...zh},
|
||||
en: {label: "English", ...en},
|
||||
|
@ -23,6 +23,6 @@ export const en = defineConfig({
|
||||
message: 'Documentation built with <a href="https://vitepress.dev/">VitePress</a> | API references generated by <a href="https://github.com/LiteyukiStudio/litedoc">litedoc</a>',
|
||||
copyright: ThemeConfig.copyright
|
||||
},
|
||||
outline: ThemeConfig.getOutLine("Page Content")
|
||||
outline: ThemeConfig.getOutLine("Page Content"),
|
||||
},
|
||||
})
|
@ -23,6 +23,6 @@ export const ja = defineConfig({
|
||||
message: '<a href="https://vitepress.dev/">VitePress</a> で構築されたドキュメント | <a href="https://github.com/LiteyukiStudio/litedoc">litedoc</a> によって生成されたAPIリファレンス',
|
||||
copyright: ThemeConfig.copyright
|
||||
},
|
||||
outline: ThemeConfig.getOutLine("ページの内容")
|
||||
outline: ThemeConfig.getOutLine("ページの内容"),
|
||||
},
|
||||
})
|
@ -23,6 +23,6 @@ export const zh = defineConfig({
|
||||
message: '文档由 <a href="https://vitepress.dev/">VitePress</a> 构建 | API引用由 <a href="https://github.com/LiteyukiStudio/litedoc">litedoc</a> 生成',
|
||||
copyright: ThemeConfig.copyright
|
||||
},
|
||||
outline: ThemeConfig.getOutLine("页面内容")
|
||||
outline: ThemeConfig.getOutLine("页面内容"),
|
||||
},
|
||||
})
|
Loading…
Reference in New Issue
Block a user