From 121360b16183adff82f7d6ccc92b001b3e1ed4cd Mon Sep 17 00:00:00 2001 From: Junseong Park Date: Fri, 5 Jul 2024 20:50:48 +0900 Subject: [PATCH] i18n(ko-KR): update `configuration.mdx` --- .../docs/ko/reference/configuration.mdx | 70 ++++++++++++------- 1 file changed, 46 insertions(+), 24 deletions(-) diff --git a/docs/src/content/docs/ko/reference/configuration.mdx b/docs/src/content/docs/ko/reference/configuration.mdx index a65894f007..2527d1893f 100644 --- a/docs/src/content/docs/ko/reference/configuration.mdx +++ b/docs/src/content/docs/ko/reference/configuration.mdx @@ -99,25 +99,34 @@ starlight({ 사이트의 사이드바 탐색 항목을 구성합니다. -사이드바는 링크의 배열과 링크 그룹입니다. 각 항목은 `label`과 함께 다음 속성 중 하나를 반드시 포함해야합니다. +사이드바는 링크의 배열과 링크 그룹입니다. +`slug`를 사용하는 항목을 제외하고, 각 항목은 `label`과 함께 다음 속성 중 하나를 반드시 포함해야합니다. - `link` — 특정 URL에 대한 단일 링크(예: `'/home'` 또는 `'https://example.com'`). +- `slug` — 내부 페이지에 대한 참조 (예: `'guides/getting-started'`). + - `items` — 더 많은 사이드바 링크와 하위 그룹을 포함하는 배열 - `autogenerate` — 링크 그룹을 자동으로 생성하기 위해 문서의 디렉터리를 지정하는 객체 +내부 링크는 `slug` 속성이 있는 객체 대신 문자열로 지정할 수도 있습니다. + ```js starlight({ sidebar: [ // '홈'이라는 라벨이 붙은 단일 링크 항목 { label: '홈', link: '/' }, - // 두 개의 링크가 포함된 '여기서부터' 라는 라벨이 붙은 그룹 + // 네 개의 링크가 포함된 '여기서부터' 라는 라벨이 붙은 그룹 { label: '여기서부터', items: [ - { label: '소개', link: '/intro' }, - { label: '다음 단계', link: '/next-steps' }, + // 내부 링크에 `slug`를 사용합니다. + { slug: 'intro' }, + { slug: 'installation' }, + // 또는 내부 링크에 대한 약칭을 사용합니다. + 'tutorial', + 'next-steps', ], }, // 'reference' 디렉터리의 모든 페이지에 연결되는 그룹 @@ -139,16 +148,13 @@ starlight({ 자동 생성된 하위 그룹은 기본적으로 상위 그룹의 `collapsed` 속성을 따릅니다. 이를 변경하려면 `autogenerate.collapsed` 속성을 설정하세요. -```js {5,16} +```js {5,13} sidebar: [ // 최소화된 링크 그룹 { label: '최소화된 링크 모음', collapsed: true, - items: [ - { label: '소개', link: '/intro' }, - { label: '다음 단계', link: '/next-steps' }, - ], + items: ['intro', 'next-steps'], }, // 최소화된 자동 생성 하위 그룹을 포함하는 펼쳐진 그룹 { @@ -190,21 +196,37 @@ sidebar: [ #### `SidebarItem` ```ts -type SidebarItem = { - label: string; - translations?: Record; - badge?: string | BadgeConfig; -} & ( - | { - link: string; - attrs?: Record; - } - | { items: SidebarItem[]; collapsed?: boolean } - | { - autogenerate: { directory: string; collapsed?: boolean }; - collapsed?: boolean; - } -); +type SidebarItem = + | string + | ({ + translations?: Record; + badge?: string | BadgeConfig; + } & ( + | { + // 링크 + link: string; + label: string; + attrs?: Record; + } + | { + // 내부 링크 + slug: string; + label?: string; + attrs?: Record; + } + | { + // 링크 그룹 + label: string; + items: SidebarItem[]; + collapsed?: boolean; + } + | { + // 자동으로 생성된 링크 그룹 + label: string; + autogenerate: { directory: string; collapsed?: boolean }; + collapsed?: boolean; + } + )); ``` #### `BadgeConfig`