From 241889e7844d6ae136db2ef930acf4e95a46b266 Mon Sep 17 00:00:00 2001 From: Junseong Park <39112954+jsparkdev@users.noreply.github.com> Date: Sun, 16 Feb 2025 12:57:10 +0900 Subject: [PATCH 1/2] i18n(ko-KR): update `overrides.md` --- .../content/docs/ko/reference/overrides.md | 143 ------------------ 1 file changed, 143 deletions(-) diff --git a/docs/src/content/docs/ko/reference/overrides.md b/docs/src/content/docs/ko/reference/overrides.md index 216eae47306..22e316dd400 100644 --- a/docs/src/content/docs/ko/reference/overrides.md +++ b/docs/src/content/docs/ko/reference/overrides.md @@ -10,149 +10,6 @@ Starlight의 [`components`](/ko/reference/configuration/#components) 구성 옵 [컴포넌트 재정의 가이드](/ko/guides/overriding-components/)에서 자세히 알아보세요. -## 컴포넌트 속성 - -모든 컴포넌트는 현재 페이지의 정보가 포함된 표준 `Astro.props` 객체를 사용할 수 있습니다. - -사용자 정의 컴포넌트의 타입을 설정하기 위해 Starlight로부터 `Props` 타입을 가져옵니다. - -```astro ---- -// src/components/Custom.astro -import type { Props } from '@astrojs/starlight/props'; - -const { hasSidebar } = Astro.props; -// ^ type: boolean ---- -``` - -이는 `Astro.props`에 접근할 때 자동완성과 타입을 제공합니다. - -### 속성 - -Starlight는 사용자 정의 컴포넌트에 다음 속성들을 전달합니다. - -#### `dir` - -**타입:** `'ltr' | 'rtl'` - -페이지 작성 방향입니다. - -#### `lang` - -**타입:** `string` - -이 페이지의 로케일에 대한 BCP-47 언어 태그입니다. 예: `en`, `zh-CN` 또는 `pt-BR` - -#### `locale` - -**타입:** `string | undefined` - -언어가 제공되는 기본 경로입니다. 루트 로케일 슬러그의 경우 `undefined`입니다. - -#### `siteTitle` - -**타입:** `string` - -이 페이지의 로케일에 대한 사이트 제목입니다. - -#### `siteTitleHref` - -**타입:** `string` - -`/`처럼 홈페이지와 연결되는 사이트 제목 `href` 속성의 값입니다. -다국어 사이트의 경우 `/en/` 또는 `/zh-cn/`과 같은 현재 로케일이 포함됩니다. - -#### `slug` - -**타입:** `string` - -콘텐츠 파일 이름에서 생성된 이 페이지의 슬러그입니다. - -이 속성은 더 이상 사용되지 않으며 향후 버전의 Starlight에서 제거될 예정입니다. -[Starlight의 `docsLoader`](/ko/manual-setup/#콘텐츠-컬렉션-구성)를 사용하여 새 콘텐츠 레이어 API로 마이그레이션하고 대신 [`id`](#id) 속성을 사용하세요. - -#### `id` - -**타입:** `string` - -이 페이지의 슬러그 또는 [`legacy.collections`](https://docs.astro.build/ko/reference/legacy-flags/#collections) 플래그를 사용하는 경우 콘텐츠 파일명을 기준으로 한 이 페이지의 고유 ID입니다. - -#### `isFallback` - -**타입:** `true | undefined` - -이 페이지가 현재 언어로 번역되지 않고 기본 로케일의 대체 콘텐츠를 사용하는 경우 `true`입니다. -다국어 사이트에서만 사용됩니다. - -#### `entryMeta` - -**타입:** `{ dir: 'ltr' | 'rtl'; lang: string }` - -페이지 콘텐츠의 로케일 메타데이터입니다. 페이지가 대체 콘텐츠를 사용하는 경우 최상위 로케일 값과 다를 수 있습니다. - -#### `entry` - -현재 페이지에 대한 Astro 콘텐츠 컬렉션 항목입니다. -`entry.data`는 현재 페이지에 대한 프론트매터 값을 포함합니다. - -```ts -entry: { - data: { - title: string; - description: string | undefined; - // etc. - } -} -``` - -[Astro 컬렉션 엔트리 타입](https://docs.astro.build/ko/reference/modules/astro-content/#collectionentry) 참조에서 이 객체의 형태에 대해 자세히 알아보세요. - -#### `sidebar` - -**타입:** `SidebarEntry[]` - -페이지에 대한 사이트 탐색 사이드바 엔트리입니다. - -#### `hasSidebar` - -**타입:** `boolean` - -이 페이지에 사이드바를 표시할지 여부입니다. - -#### `pagination` - -**타입:** `{ prev?: Link; next?: Link }` - -활성화된 경우 사이드바의 이전 및 다음 페이지로 이동하는 링크를 표시합니다. - -#### `toc` - -**타입:** `{ minHeadingLevel: number; maxHeadingLevel: number; items: TocItem[] } | undefined` - -활성화된 경우 이 페이지의 목차를 표시합니다. - -#### `headings` - -**타입:** `{ depth: number; slug: string; text: string }[]` - -현재 페이지에서 추출된 모든 Markdown 제목의 배열입니다. -Starlight의 구성 옵션을 준수하는 콘텐츠 목차 컴포넌트를 생성하기 위해서는 [`toc`](#toc)를 사용하세요. - -#### `lastUpdated` - -**타입:** `Date | undefined` - -활성화된 경우 이 페이지가 마지막으로 업데이트된 날짜를 나타내기 위해 JavaScript `Date`객체가 사용됩니다. - -#### `editUrl` - -**타입:** `URL | undefined` - -활성화된 경우 이 페이지를 편집할 수 있는 주소를 나타내기 위해 `URL` 객체가 사용됩니다. - ---- - ## 컴포넌트 ### 헤드 From db0e3ed42e0ca7bd0844808c87b22ec63d7dfa1d Mon Sep 17 00:00:00 2001 From: Junseong Park <39112954+jsparkdev@users.noreply.github.com> Date: Sun, 16 Feb 2025 13:08:05 +0900 Subject: [PATCH 2/2] update --- docs/src/content/docs/ko/reference/overrides.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/content/docs/ko/reference/overrides.md b/docs/src/content/docs/ko/reference/overrides.md index 22e316dd400..ca091ff1dc4 100644 --- a/docs/src/content/docs/ko/reference/overrides.md +++ b/docs/src/content/docs/ko/reference/overrides.md @@ -86,7 +86,7 @@ Starlight의 상단 탐색 바를 렌더링하는 컴포넌트입니다. **기본 컴포넌트:** [`Header.astro`](https://github.com/withastro/starlight/blob/main/packages/starlight/components/Header.astro) Header 컴포넌트는 모든 페이지 상단에 표시됩니다. -기본적으로 [``](#sitetitle-1), [``](#search), [``](#socialicons), [``](#themeselect), 와 [``](#languageselect)를 표시합니다. +기본적으로 [``](#sitetitle), [``](#search), [``](#socialicons), [``](#themeselect), 와 [``](#languageselect)를 표시합니다. #### `SiteTitle`