Skip to content

Commit 5947f91

Browse files
jsparkdevHiDeoo
andauthored
i18n(ko-KR): update frontmatter.md (#2683)
Co-authored-by: HiDeoo <494699+HiDeoo@users.noreply.github.com>
1 parent 67dc582 commit 5947f91

File tree

1 file changed

+23
-18
lines changed

1 file changed

+23
-18
lines changed

‎docs/src/content/docs/ko/reference/frontmatter.md

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
title: 프론트매터 참조
3-
description: Starlight가 지원하는 기본 프론트매터 필드에 대한 개요입니다.
2+
title: 프런트매터 참조
3+
description: Starlight가 지원하는 기본 프런트매터 필드에 대한 개요입니다.
44
---
55

6-
프론트매터의 값을 설정하여 Starlight에서 개별 Markdown 및 MDX 페이지를 변경할 수 있습니다. 예를 들어 일반 페이지에서는 `title``description` 필드를 설정할 수 있습니다.
6+
프런트매터의 값을 설정하여 Starlight에서 개별 Markdown 및 MDX 페이지를 변경할 수 있습니다. 예를 들어 일반 페이지에서는 `title``description` 필드를 설정할 수 있습니다.
77

88
```md {3-4}
99
---
@@ -15,7 +15,7 @@ description: 내가 진행 중인 프로젝트에 대해 자세히 알아보세
1515
나를 소개하는 페이지에 오신 것을 환영합니다!
1616
```
1717

18-
## 프론트매터 필드
18+
## 프런트매터 필드
1919

2020
### `title` (필수)
2121

@@ -33,7 +33,7 @@ description: 내가 진행 중인 프로젝트에 대해 자세히 알아보세
3333

3434
**타입**: `string`
3535

36-
페이지의 슬러그를 재정의합니다. 자세한 내용은 Astro 공식문서의 [“사용자 정의 슬러그 정의”](https://docs.astro.build/ko/guides/content-collections/#defining-custom-slugs)를 참조하세요.
36+
페이지의 슬러그를 재정의합니다. 자세한 내용은 Astro 공식문서의 [“사용자 지정 ID 정의”](https://docs.astro.build/ko/guides/content-collections/#사용자-지정-id-정의)를 참조하세요.
3737

3838
### `editUrl`
3939

@@ -45,7 +45,7 @@ description: 내가 진행 중인 프로젝트에 대해 자세히 알아보세
4545

4646
**타입:** [`HeadConfig[]`](/ko/reference/configuration/#headconfig)
4747

48-
`head` 프론트매터 필드를 사용하여 페이지의 `<head>`에 태그를 추가할 수 있습니다. 이는 사용자 정의 스타일, 메타데이터 또는 기타 태그를 단일 페이지에 추가할 수 있음을 의미합니다. [전역 `head` 옵션](/ko/reference/configuration/#head)과 유사합니다.
48+
`head` 프런트매터 필드를 사용하여 페이지의 `<head>`에 태그를 추가할 수 있습니다. 이는 사용자 정의 스타일, 메타데이터 또는 기타 태그를 단일 페이지에 추가할 수 있음을 의미합니다. [전역 `head` 옵션](/ko/reference/configuration/#head)과 유사합니다.
4949

5050
```md
5151
---
@@ -390,21 +390,22 @@ sidebar:
390390
---
391391
```
392392

393-
## 프런트매터 스키마 맞춤설정
393+
## 프런트매터 스키마 사용자 정의
394394

395-
Starlight의 `docs` 콘텐츠 컬렉션에 대한 프런트매터 스키마는 `docsSchema()` 도우미를 사용하여 `src/content/config.ts`에 구성됩니다.
395+
Starlight의 `docs` 콘텐츠 컬렉션에 대한 프런트매터 스키마는 `docsSchema()` 도우미를 사용하여 `src/content.config.ts`에 구성됩니다.
396396

397-
```ts {3,6}
398-
// src/content/config.ts
397+
```ts {4,7}
398+
// src/content.config.ts
399399
import { defineCollection } from 'astro:content';
400+
import { docsLoader, i18nLoader } from '@astrojs/starlight/loaders';
400401
import { docsSchema } from '@astrojs/starlight/schema';
401402

402403
export const collections = {
403-
docs: defineCollection({ schema: docsSchema() }),
404+
docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),
404405
};
405406
```
406407

407-
Astro 공식문서의 ["컬렉션 스키마 정의"](https://docs.astro.build/ko/guides/content-collections/#defining-a-collection-schema)에서 콘텐츠 컬렉션 스키마에 대해 자세히 알아보세요.
408+
Astro 공식문서의 ["컬렉션 스키마 정의"](https://docs.astro.build/ko/guides/content-collections/#컬렉션-스키마-정의)에서 콘텐츠 컬렉션 스키마에 대해 자세히 알아보세요.
408409

409410
`docsSchema()`는 다음 옵션을 사용합니다:
410411

@@ -414,17 +415,19 @@ Astro 공식문서의 ["컬렉션 스키마 정의"](https://docs.astro.build/ko
414415
**기본값:** `z.object({})`
415416

416417
`docsSchema()` 옵션에서 `extend`를 설정하여 추가 필드로 Starlight의 스키마를 확장하세요.
417-
값은 [Zod 스키마](https://docs.astro.build/ko/guides/content-collections/#defining-datatypes-with-zod)여야 합니다.
418+
값은 [Zod 스키마](https://docs.astro.build/ko/guides/content-collections/#zod를-사용한-데이터-타입-정의)여야 합니다.
418419

419420
다음 예시에서는 `description` 필드에 더 엄격한 타입을 제공하여 필수 항목으로 만들고, 새로운 선택적 필드인 `category`를 추가합니다.
420421

421-
```ts {8-13}
422-
// src/content/config.ts
422+
```ts {10-15}
423+
// src/content.config.ts
423424
import { defineCollection, z } from 'astro:content';
425+
import { docsLoader } from '@astrojs/starlight/loaders';
424426
import { docsSchema } from '@astrojs/starlight/schema';
425427

426428
export const collections = {
427429
docs: defineCollection({
430+
loader: docsLoader(),
428431
schema: docsSchema({
429432
extend: z.object({
430433
// 기본 제공 필드를 선택 사항이 아닌 필수 항목으로 변경합니다.
@@ -437,15 +440,17 @@ export const collections = {
437440
};
438441
```
439442

440-
[Astro `image()` 도우미](https://docs.astro.build/ko/guides/images/#images-in-content-collections)를 활용하려면 스키마 확장을 반환하는 함수를 사용하세요.
443+
[Astro `image()` 도우미](https://docs.astro.build/ko/guides/images/#콘텐츠-컬렉션의-이미지)를 활용하려면 스키마 확장을 반환하는 함수를 사용하세요.
441444

442-
```ts {8-13}
443-
// src/content/config.ts
445+
```ts {10-15}
446+
// src/content.config.ts
444447
import { defineCollection, z } from 'astro:content';
448+
import { docsLoader } from '@astrojs/starlight/loaders';
445449
import { docsSchema } from '@astrojs/starlight/schema';
446450

447451
export const collections = {
448452
docs: defineCollection({
453+
loader: docsLoader(),
449454
schema: docsSchema({
450455
extend: ({ image }) => {
451456
return z.object({

0 commit comments

Comments
 (0)