Skip to content

Commit

Permalink
i18n(ko-KR): update configuration.mdx (#2095)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsparkdev committed Jul 5, 2024
1 parent 1c70df6 commit c3a4a73
Showing 1 changed file with 46 additions and 24 deletions.
70 changes: 46 additions & 24 deletions docs/src/content/docs/ko/reference/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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' 디렉터리의 모든 페이지에 연결되는 그룹
Expand All @@ -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'],
},
// 최소화된 자동 생성 하위 그룹을 포함하는 펼쳐진 그룹
{
Expand Down Expand Up @@ -190,21 +196,37 @@ sidebar: [
#### `SidebarItem`

```ts
type SidebarItem = {
label: string;
translations?: Record<string, string>;
badge?: string | BadgeConfig;
} & (
| {
link: string;
attrs?: Record<string, string | number | boolean | undefined>;
}
| { items: SidebarItem[]; collapsed?: boolean }
| {
autogenerate: { directory: string; collapsed?: boolean };
collapsed?: boolean;
}
);
type SidebarItem =
| string
| ({
translations?: Record<string, string>;
badge?: string | BadgeConfig;
} & (
| {
// 링크
link: string;
label: string;
attrs?: Record<string, string | number | boolean | undefined>;
}
| {
// 내부 링크
slug: string;
label?: string;
attrs?: Record<string, string | number | boolean | undefined>;
}
| {
// 링크 그룹
label: string;
items: SidebarItem[];
collapsed?: boolean;
}
| {
// 자동으로 생성된 링크 그룹
label: string;
autogenerate: { directory: string; collapsed?: boolean };
collapsed?: boolean;
}
));
```

#### `BadgeConfig`
Expand Down

0 comments on commit c3a4a73

Please sign in to comment.