11import { defineConfig , DefaultTheme } from 'vitepress' ;
22import { getSidebarItems } from './libs/getSidebarItems.mts' ;
33import { sortByText } from './libs/sortByText.mts' ;
4- import { sourceRoot } from './shared.mts' ;
4+ import { corePackageRoot , mobilePackageRoot } from './shared.mts' ;
55
66export const ko = defineConfig ( {
77 lang : 'ko' ,
88 themeConfig : {
99 nav : nav ( ) ,
1010 sidebar : sidebar ( ) ,
1111 editLink : {
12- pattern : 'https://github.com/toss/react-simplikit/edit/main/src/ :path' ,
12+ pattern : 'https://github.com/toss/react-simplikit/edit/main/:path' ,
1313 text : 'GitHub에서 수정하기' ,
1414 } ,
1515 footer : {
@@ -21,44 +21,79 @@ export const ko = defineConfig({
2121
2222function nav ( ) : DefaultTheme . NavItem [ ] {
2323 return [
24- { text : '홈' , link : '/ko' } ,
25- { text : '소개 ' , link : '/ko/intro.html ' } ,
26- { text : '레퍼런스 ' , link : '/ko/components/ImpressionArea.html ' } ,
24+ { text : '홈' , link : '/ko/ ' } ,
25+ { text : 'Mobile ' , link : '/ko/mobile/ intro' } ,
26+ { text : 'Core ' , link : '/ko/core/intro ' } ,
2727 ] ;
2828}
2929
3030function sidebar ( ) : DefaultTheme . Sidebar {
31+ return {
32+ '/ko/core/' : coreSidebar ( ) ,
33+ '/ko/mobile/' : mobileSidebar ( ) ,
34+ } ;
35+ }
36+
37+ function coreSidebar ( ) : DefaultTheme . SidebarItem [ ] {
3138 return [
3239 {
3340 text : '가이드' ,
3441 items : [
35- { text : '소개' , link : '/ko/intro' } ,
36- { text : 'react-simplikit, 선택의 이유' , link : '/ko/why-react-simplikit-matters' } ,
37- { text : '설치하기' , link : '/ko/installation' } ,
38- { text : '설계 원칙' , link : '/ko/design-principles' } ,
39- { text : '기여하기' , link : '/ko/contributing' } ,
42+ { text : '소개' , link : '/ko/core/ intro' } ,
43+ { text : 'react-simplikit, 선택의 이유' , link : '/ko/core/ why-react-simplikit-matters' } ,
44+ { text : '설치하기' , link : '/ko/core/ installation' } ,
45+ { text : '설계 원칙' , link : '/ko/core/ design-principles' } ,
46+ { text : '기여하기' , link : '/ko/core/ contributing' } ,
4047 ] ,
4148 } ,
4249 {
4350 text : '레퍼런스' ,
4451 items : sortByText ( [
4552 {
4653 text : '컴포넌트' ,
47- items : getSidebarItems ( sourceRoot , 'components' , '*' , 'ko' ) ,
54+ collapsed : false ,
55+ items : getSidebarItems ( corePackageRoot , 'components' , '/core' , 'ko' ) ,
4856 } ,
4957 {
5058 text : '훅' ,
51- items : getSidebarItems ( sourceRoot , 'hooks' , '*' , 'ko' ) ,
59+ collapsed : false ,
60+ items : getSidebarItems ( corePackageRoot , 'hooks' , '/core' , 'ko' ) ,
5261 } ,
5362 {
5463 text : '유틸리티' ,
55- items : getSidebarItems ( sourceRoot , 'utils' , '*' , 'ko' ) ,
64+ collapsed : false ,
65+ items : getSidebarItems ( corePackageRoot , 'utils' , '/core' , 'ko' ) ,
5666 } ,
5767 ] ) ,
5868 } ,
5969 ] ;
6070}
6171
72+ function mobileSidebar ( ) : DefaultTheme . SidebarItem [ ] {
73+ return [
74+ {
75+ text : '가이드' ,
76+ items : [
77+ { text : '소개' , link : '/ko/mobile/intro' } ,
78+ { text : '앞으로의 방향' , link : '/ko/mobile/roadmap' } ,
79+ { text : '설치하기' , link : '/ko/mobile/installation' } ,
80+ { text : '설계 원칙' , link : '/ko/mobile/design-principles' } ,
81+ { text : '기여하기' , link : '/ko/mobile/contributing' } ,
82+ ] ,
83+ } ,
84+ {
85+ text : '레퍼런스' ,
86+ items : [
87+ {
88+ text : '훅' ,
89+ collapsed : false ,
90+ items : getSidebarItems ( mobilePackageRoot , 'hooks' , '/mobile' , 'ko' ) ,
91+ } ,
92+ ] ,
93+ } ,
94+ ] ;
95+ }
96+
6297export const search : DefaultTheme . LocalSearchOptions [ 'locales' ] = {
6398 ko : {
6499 translations : {
0 commit comments