chore: simplify code
This commit is contained in:
1 parent
b93dda7c55
commit
85154a5b46
1 file changed
+3
-2
@@ -6,9 +6,10 @@ import { VitePressI18nOptions } from 'vitepress-i18n/dist/types'
|
||||
|
||||
const capitalizeFirst = (str: string): string => str.charAt(0).toUpperCase() + str.slice(1)
|
||||
const defaultLocale: string = 'en'
|
||||
const supportLocales = [defaultLocale, 'ko']
|
||||
|
||||
const vitePressI18nConfigs: VitePressI18nOptions = {
|
||||
locales: [defaultLocale, 'ko'],
|
||||
locales: supportLocales,
|
||||
rootLocale: defaultLocale,
|
||||
searchProvider: 'local',
|
||||
description: {
|
||||
@@ -36,7 +37,7 @@ const vitePressI18nConfigs: VitePressI18nOptions = {
|
||||
}
|
||||
|
||||
const vitePressSidebarConfigs: VitePressSidebarOptions = [
|
||||
...[defaultLocale, 'ko'].map((lang) => {
|
||||
...supportLocales.map((lang) => {
|
||||
return {
|
||||
collapsed: false,
|
||||
useTitleFromFileHeading: true,
|
||||
|
||||
Reference in new issue
Block a user