Skip to content

Commit a394a23

Browse files
committed
test2
1 parent 5ec0680 commit a394a23

2 files changed

Lines changed: 2 additions & 12 deletions

File tree

docusaurus.config.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,8 @@ const config = {
6262
],
6363
],
6464
i18n: {
65-
defaultLocale: 'zh-CN',
65+
defaultLocale: 'zh',
6666
locales: ['en', 'zh-CN'],
67-
localeConfigs: {
68-
'zh-CN': {
69-
label: '简体中文',
70-
path: '' // 空字符串表示不需要路径前缀
71-
},
72-
en: {
73-
label: 'English',
74-
path: 'en' // 英文需要 /en/ 路径前缀
75-
}
76-
}
7767
},
7868
themeConfig:
7969

src/pages/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function HomepageHeader() {
3030
arrows: false,
3131
};
3232
const { i18n } = useDocusaurusContext();
33-
const isEnglish = i18n.currentLocale === 'en';
33+
const isEnglish = i18n.currentLocale !== 'zh-CN';
3434
return (
3535
<div id='main'>
3636
<Slider {...settings}>

0 commit comments

Comments
 (0)