Skip to content

Commit

Permalink
fix wierd vitepress search configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Ampernic committed Aug 17, 2024
1 parent 4f51360 commit b7eea8a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 21 deletions.
31 changes: 17 additions & 14 deletions .vitepress/config/plugins/vitepress-search/index.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
export const vitepressSearchOptions = {
locales: {
root: {
translations: {
button: {
buttonText: 'Поиск',
buttonAriaLabel: 'Поиск'
},
modal: {
noResultsText: 'Нет результатов по запросу',
resetButtonTitle: 'Сбросить',
footer: {
selectText: 'для выбора',
navigateText: 'для навигации',
closeText: 'закрыть'
provider: 'local' as const,
options: {
locales: {
root: {
translations: {
button: {
buttonText: 'Поиск',
buttonAriaLabel: 'Поиск'
},
modal: {
noResultsText: 'Нет результатов по запросу',
resetButtonTitle: 'Сбросить',
footer: {
selectText: 'для выбора',
navigateText: 'для навигации',
closeText: 'закрыть'
}
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions .vitepress/config/ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ export const ru = defineConfigWithTheme({
lang: 'ru-RU',
description: 'Свободная WIKI по операционной системе ALT Regular Gnome',
themeConfig: {
search: {
options: vitepressSearchOptions
},
nav: nav['ru-RU'],
sidebar: sidebar['ru-RU'],
editLink: {
Expand Down
6 changes: 2 additions & 4 deletions .vitepress/config/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
PageProperties,
PagePropertiesMarkdownSection
} from '@nolebase/vitepress-plugin-page-properties/vite'
import { alignmentContainers, headTransformer, nolebaseGitChangelogOptions } from './plugins'
import { alignmentContainers, headTransformer, nolebaseGitChangelogOptions, vitepressSearchOptions } from './plugins'

export const shared = defineConfig({
title: 'ALT Gnome Wiki',
Expand Down Expand Up @@ -83,9 +83,7 @@ export const shared = defineConfig({
}
},
themeConfig: {
search: {
provider: 'local'
},
search: vitepressSearchOptions,
logo: { src: '/logo.png', width: 36, height: 36, alt: 'ALT Gnome Wiki' },
socialLinks: [
{
Expand Down

0 comments on commit b7eea8a

Please sign in to comment.