Skip to content

Commit

Permalink
config: fix search
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegShchavelev committed Jul 31, 2024
1 parent 329ad2b commit 38078cb
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 25 deletions.
3 changes: 2 additions & 1 deletion .vitepress/config/plugins/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export { NolebaseEnhancedReadabilitiesOptions } from './NolebaseEnhancedReadabilities/index'
export { NolebaseGitChangelogOptions } from './NolebaseGitChangelog/index'
export { VueSilentBoxOptions } from './VueSilentBox/index'
export { YandexMetrikaOptions } from './YandexMetrica/index'
export { YandexMetrikaOptions } from './YandexMetrica/index'
export { vpSearchOptions } from './vitepress-search'
21 changes: 21 additions & 0 deletions .vitepress/config/plugins/vitepress-search/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
export const vpSearchOptions = {
locales: {
root: {
translations: {
button: {
buttonText: 'Поиск',
buttonAriaLabel: 'Поиск'
},
modal: {
noResultsText: 'Нет результатов по запросу',
resetButtonTitle: 'Сбросить',
footer: {
selectText: 'для выбора',
navigateText: 'для навигации',
closeText: 'закрыть'
}
}
}
}
}
}
24 changes: 0 additions & 24 deletions .vitepress/config/ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,6 @@ export const ru = defineConfigWithTheme({
themeConfig: {
nav: nav,
sidebar: sidebar,
search: {
provider: 'local',
options: {
locales: {
root: {
translations: {
button: {
buttonText: 'Поиск',
buttonAriaLabel: 'Поиск'
},
modal: {
noResultsText: 'Нет результатов по запросу',
resetButtonTitle: 'Сбросить',
footer: {
selectText: 'для выбора',
navigateText: 'для навигации',
closeText: 'закрыть'
}
}
}
}
}
}
},
editLink: {
pattern: 'https://github.com/OlegShchavelev/ALTRegularKDEWiki/edit/main/docs/:path',
text: 'Предложить изменения на этой странице'
Expand Down
24 changes: 24 additions & 0 deletions .vitepress/config/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,30 @@ export const shared = defineConfig({
},
themeConfig: {
logo: { src: '/logo.png', width: 36, height: 36, alt: "ALT KDE Wiki" },
search: {
provider: 'local',
options: {
locales: {
root: {
translations: {
button: {
buttonText: 'Поиск',
buttonAriaLabel: 'Поиск'
},
modal: {
noResultsText: 'Нет результатов по запросу',
resetButtonTitle: 'Сбросить',
footer: {
selectText: 'для выбора',
navigateText: 'для навигации',
closeText: 'закрыть'
}
}
}
}
}
}
},
socialLinks: [
{
icon: {
Expand Down

0 comments on commit 38078cb

Please sign in to comment.