mirror of
https://github.com/XTLS/Xray-docs-next.git
synced 2026-09-27 17:38:05 +03:00
搜索功能
This commit is contained in:
+74
-1
@@ -17,6 +17,35 @@ export default defineConfig({
|
||||
{ text: "开发指南", link: "/development/" },
|
||||
],
|
||||
|
||||
search: {
|
||||
provider: "local",
|
||||
options: {
|
||||
miniSearch: {
|
||||
options: {
|
||||
tokenize: (str) => str.split(/[\s,,。、]+/),
|
||||
},
|
||||
},
|
||||
locales: {
|
||||
root: {
|
||||
translations: {
|
||||
button: {
|
||||
buttonText: "搜索",
|
||||
buttonAriaLabel: "搜索",
|
||||
},
|
||||
modal: {
|
||||
noResultsText: "无法找到相关结果",
|
||||
resetButtonTitle: "清除查询条件",
|
||||
footer: {
|
||||
selectText: "选择",
|
||||
navigateText: "切换",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
outline: {
|
||||
level: [2, 4],
|
||||
label: "页面导航",
|
||||
@@ -268,7 +297,7 @@ export default defineConfig({
|
||||
locales: {
|
||||
root: {
|
||||
label: "简体中文",
|
||||
lang: "cn",
|
||||
lang: "zh",
|
||||
},
|
||||
|
||||
en: {
|
||||
@@ -283,6 +312,19 @@ export default defineConfig({
|
||||
{ text: "Developer Guide", link: "/en/development/" },
|
||||
],
|
||||
|
||||
search: {
|
||||
options: {
|
||||
miniSearch: {
|
||||
options: {
|
||||
tokenize: (str) =>
|
||||
str
|
||||
.split(/[\s.,;!?'"(){}[\]\-_+=&%$#@~`^<>|\\]+/)
|
||||
.filter(Boolean),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
outline: {
|
||||
label: "On this page",
|
||||
},
|
||||
@@ -617,6 +659,37 @@ export default defineConfig({
|
||||
{ text: "Руководство разработчика", link: "/ru/development/" },
|
||||
],
|
||||
|
||||
search: {
|
||||
options: {
|
||||
miniSearch: {
|
||||
options: {
|
||||
tokenize: (str) =>
|
||||
str
|
||||
.split(/[\s.,;!?'"(){}[\]\-_+=&%$#@~`^<>|\\]+/)
|
||||
.filter(Boolean),
|
||||
},
|
||||
},
|
||||
locales: {
|
||||
ru: {
|
||||
translations: {
|
||||
button: {
|
||||
buttonText: "Поиск",
|
||||
buttonAriaLabel: "Поиск",
|
||||
},
|
||||
modal: {
|
||||
noResultsText: "Результаты не найдены",
|
||||
resetButtonTitle: "Очистить запрос",
|
||||
footer: {
|
||||
selectText: "Выбрать",
|
||||
navigateText: "Переключить",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
outline: {
|
||||
label: "Содержание страницы",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user