Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n(ko-KR): update configuration.mdx #2095

Merged
merged 1 commit into from
Jul 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading