Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(fix): include local search #570

Merged
merged 6 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
202 changes: 0 additions & 202 deletions docs/.vitepress/config.ts

This file was deleted.

30 changes: 30 additions & 0 deletions docs/.vitepress/config/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,35 @@ export const deConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
],
},
],
search: {
provider: 'local',
options: {
locales: {
de: {
translations: {
button: {
buttonText: 'Suchen',
buttonAriaLabel: 'Suchen',
},
modal: {
displayDetails: 'Detaillierte Liste anzeigen',
resetButtonTitle: 'Suche zurücksetzen',
backButtonTitle: 'Suche schließen',
noResultsText: 'Keine Ergebnisse für',
DennisSmuda marked this conversation as resolved.
Show resolved Hide resolved
footer: {
selectText: 'zur Auswahl',
selectKeyAriaLabel: 'enter',
navigateText: 'zum Navigieren',
navigateUpKeyAriaLabel: 'Pfeil nach oben',
navigateDownKeyAriaLabel: 'Pfeil nach unten',
closeText: 'zum Schließen',
closeKeyAriaLabel: 'escape',
},
},
},
},
},
},
},
},
}
4 changes: 2 additions & 2 deletions docs/.vitepress/config/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export const enConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
],
},
],
},
},
],
},
}
}
34 changes: 32 additions & 2 deletions docs/.vitepress/config/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,37 @@ export const esConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
],
},
],
},
},
],
search: {
provider: 'local',
options: {
locales: {
es: {
translations: {
button: {
buttonText: 'Buscar',
buttonAriaLabel: 'Buscar',
},
modal: {
displayDetails: 'Mostrar lista detallada',
resetButtonTitle: 'Restablecer búsqueda',
backButtonTitle: 'Cerrar búsqueda',
noResultsText: 'Sin resultados para',
footer: {
selectText: 'para seleccionar',
selectKeyAriaLabel: 'entrar',
navigateText: 'para navegar',
navigateUpKeyAriaLabel: 'flecha arriba',
navigateDownKeyAriaLabel: 'flecha abajo',
closeText: 'para cerrar',
closeKeyAriaLabel: 'escape',
},
},
},
},
},
},
},
},
}
}
2 changes: 1 addition & 1 deletion docs/.vitepress/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ export default defineConfig({
de: { label: 'Deutsch', lang: 'de-DE', link: '/de/', ...deConfig },
/* zh: { label: '简体中文', lang: 'zh-CN', link: '/zh/', ...zhConfig }, */
},
})
})
35 changes: 33 additions & 2 deletions docs/.vitepress/config/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,37 @@ export const sharedConfig = defineConfig({
],
themeConfig: {
logo: '/logo.svg',
search: {
provider: 'local',
options: {
locales: {
root: {
translations: {
button: {
buttonText: 'Search',
buttonAriaLabel: 'Search',
},
modal: {
displayDetails: 'Display detailed list',
resetButtonTitle: 'Reset search',
backButtonTitle: 'Close search',
noResultsText: 'No results for',
footer: {
selectText: 'to select',
selectKeyAriaLabel: 'enter',
navigateText: 'to navigate',
navigateUpKeyAriaLabel: 'up arrow',
navigateDownKeyAriaLabel: 'down arrow',
closeText: 'to close',
closeKeyAriaLabel: 'escape',
},
},
},
},

},
},
},
socialLinks: [
{ icon: 'github', link: 'https://github.com/tresjs/tres' },
{ icon: 'x', link: 'https://twitter.com/tresjs_dev' },
Expand All @@ -39,7 +70,7 @@ export const sharedConfig = defineConfig({
vite: {
optimizeDeps: {
exclude: ['vitepress'],
include: ['three'],
include: ['@tresjs/cientos', '@stackblitz/sdk', '@vueuse/core', 'three'],
},
server: {
hmr: {
Expand All @@ -60,4 +91,4 @@ export const sharedConfig = defineConfig({
},
},
},
})
})
17 changes: 8 additions & 9 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'uno.css'
import type { Theme } from 'vitepress'
import VPTheme from 'vitepress/theme'

// .vitepress/theme/index.ts
import Theme from 'vitepress/theme'
import 'uno.css'
import './custom.css'

import TresLayout from './TresLayout.vue'
Expand All @@ -18,11 +18,10 @@ import TresLayout from './TresLayout.vue'
}) */

export default {
...Theme,
...VPTheme,

enhanceApp(ctx) {
Theme.enhanceApp(ctx)
/* ctx.app.use(plausible) */
},
/* enhanceApp(ctx) {
ctx.app.use(plausible)
}, */
Layout: TresLayout,
}
} satisfies Theme
Loading
Loading