11import { defineConfig } from 'vitepress'
22
3- import enGetConfig from "./src/en/config" ;
4- import enGetNavs from "./src/en/nav" ;
5- import enGetSidebar from "./src/en/sidebars" ;
3+ import enConfig from "./src/en/config" ;
4+ import enNav from "./src/en/nav" ;
5+ import enSidebar from "./src/en/sidebars" ;
66
7- import cnGetConfig from "./src/zh-cn/config" ;
8- import cnGetNavs from "./src/zh-cn/nav" ;
9- import cnGetSidebar from "./src/zh-cn/sidebars" ;
7+ import cnConfig from "./src/zh-cn/config" ;
8+ import cnNav from "./src/zh-cn/nav" ;
9+ import cnSidebar from "./src/zh-cn/sidebars" ;
1010
11- import hkGetConfig from "./src/zh-hk/config" ;
12- import hkGetNavs from "./src/zh-hk/nav" ;
13- import hkGetSidebar from "./src/zh-hk/sidebars" ;
11+ import hkConfig from "./src/zh-hk/config" ;
12+ import hkNav from "./src/zh-hk/nav" ;
13+ import hkSidebar from "./src/zh-hk/sidebars" ;
1414
15- import twGetConfig from "./src/zh-tw/config" ;
16- import twGetNavs from "./src/zh-tw/nav" ;
17- import twGetSidebar from "./src/zh-tw/sidebars" ;
15+ import twConfig from "./src/zh-tw/config" ;
16+ import twNav from "./src/zh-tw/nav" ;
17+ import twSidebar from "./src/zh-tw/sidebars" ;
1818
19- import taskLists from 'markdown-it-task-lists'
19+ import taskLists from 'markdown-it-task-lists'
2020
2121// https://vitepress.dev/reference/site-config
2222export default defineConfig ( {
@@ -49,51 +49,51 @@ export default defineConfig({
4949 `
5050 ]
5151 ] ,
52- locales :{
53- root :{
54- label :"简体中文" ,
55- lang :"zh" ,
56- ...cnGetConfig ,
52+ locales : {
53+ root : {
54+ label : "简体中文" ,
55+ lang : "zh" ,
56+ ...cnConfig ,
5757 } ,
58- "zh-hk" :{
59- label :"繁體中文(港)" ,
60- lang :"zh-hk" ,
61- link :"/zh-hk/index" ,
62- ...hkGetConfig ,
63- themeConfig :{
58+ "zh-hk" : {
59+ label : "繁體中文(港)" ,
60+ lang : "zh-hk" ,
61+ link : "/zh-hk/index" ,
62+ ...hkConfig ,
63+ themeConfig : {
6464 logo : '/logo.svg' ,
65- nav : hkGetNavs ,
66- sidebar :hkGetSidebar ,
67- outline :{
68- level :[ 2 , 4 ] ,
65+ nav : hkNav ,
66+ sidebar : hkSidebar ,
67+ outline : {
68+ level : [ 2 , 4 ] ,
6969 } ,
7070 }
7171 } ,
72- "zh-tw" :{
73- label :"繁體中文(臺)" ,
74- lang :"zh-tw" ,
75- link :"/zh-tw/index" ,
76- ...twGetConfig ,
77- themeConfig :{
72+ "zh-tw" : {
73+ label : "繁體中文(臺)" ,
74+ lang : "zh-tw" ,
75+ link : "/zh-tw/index" ,
76+ ...twConfig ,
77+ themeConfig : {
7878 logo : '/logo.svg' ,
79- nav : twGetNavs ,
80- sidebar :twGetSidebar ,
81- outline :{
82- level :[ 2 , 4 ] ,
79+ nav : twNav ,
80+ sidebar : twSidebar ,
81+ outline : {
82+ level : [ 2 , 4 ] ,
8383 } ,
8484 }
8585 } ,
86- en :{
87- label :"English" ,
88- lang :"en" ,
89- link :"/en/index" ,
90- ...enGetConfig ,
91- themeConfig :{
86+ en : {
87+ label : "English" ,
88+ lang : "en" ,
89+ link : "/en/index" ,
90+ ...enConfig ,
91+ themeConfig : {
9292 logo : '/logo.svg' ,
93- nav : enGetNavs ,
94- sidebar :enGetSidebar ,
95- outline :{
96- level :[ 2 , 4 ] ,
93+ nav : enNav ,
94+ sidebar : enSidebar ,
95+ outline : {
96+ level : [ 2 , 4 ] ,
9797 } ,
9898 }
9999 }
@@ -108,7 +108,7 @@ export default defineConfig({
108108 hostname : 'https://hyperf.fans'
109109 } ,
110110 themeConfig : {
111- outline :{
111+ outline : {
112112 label : '页面导航' ,
113113 level : [ 2 , 4 ] ,
114114 } ,
@@ -125,9 +125,9 @@ export default defineConfig({
125125 } ,
126126 sidebarMenuLabel : '菜单' ,
127127 returnToTopLabel : '回到顶部' ,
128- search :{
129- provider :"local" ,
130- options :{
128+ search : {
129+ provider : "local" ,
130+ options : {
131131 locales : {
132132 zh : {
133133 translations : {
@@ -164,12 +164,12 @@ export default defineConfig({
164164 }
165165 }
166166 } ,
167- i18nRouting :false ,
168- // https://vitepress.dev/reference/default-theme-config
169167
170- nav : cnGetNavs ,
168+ i18nRouting : false ,
171169
172- sidebar : cnGetSidebar ,
170+ // https://vitepress.dev/reference/default-theme-config
171+ nav : cnNav ,
172+ sidebar : cnSidebar ,
173173
174174 socialLinks : [
175175 { icon : 'github' , link : 'https://github.com/friendsofhyperf/components' } ,
0 commit comments