Skip to content

Commit e09e22f

Browse files
authored
Merge branch 'main' into i18n
2 parents 840f28f + 5947f91 commit e09e22f

23 files changed

+137
-69
lines changed

‎docs/src/content/docs/guides/i18n.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,15 +282,15 @@ Learn more about content collection schemas in [“Defining a collection schema
282282
You can access Starlight’s [built-in UI strings](/guides/i18n/#translate-starlights-ui) as well as [user-defined](/guides/i18n/#extend-translation-schema), and [plugin-provided](/reference/plugins/#injecttranslations) UI strings through a unified API powered by [i18next](https://www.i18next.com/).
283283
This includes support for features like [interpolation](https://www.i18next.com/translation-function/interpolation) and [pluralization](https://www.i18next.com/translation-function/plurals).
284284

285-
In Astro components, this API is available as part of the [global `Astro` object](https://docs.astro.build/en/reference/api-reference/#astrolocals) as `Astro.locals.t`:
285+
In Astro components, this API is available as part of the [global `Astro` object](https://docs.astro.build/en/reference/api-reference/#locals) as `Astro.locals.t`:
286286

287287
```astro title="example.astro"
288288
<p dir={Astro.locals.t.dir()}>
289289
{Astro.locals.t('404.text')}
290290
</p>
291291
```
292292

293-
You can also use the API in [endpoints](https://docs.astro.build/en/guides/endpoints/), where the `locals` object is available as part of the [endpoint context](https://docs.astro.build/en/reference/api-reference/#contextlocals):
293+
You can also use the API in [endpoints](https://docs.astro.build/en/guides/endpoints/), where the `locals` object is available as part of the [endpoint context](https://docs.astro.build/en/reference/api-reference/#locals):
294294

295295
```ts title="src/pages/404.ts"
296296
export const GET = (context) => {
@@ -391,7 +391,7 @@ See the [`dir()` reference in the i18next documentation](https://www.i18next.com
391391

392392
## Accessing the current locale
393393

394-
You can use [`Astro.currentLocale`](https://docs.astro.build/en/reference/api-reference/#astrocurrentlocale) to read the current locale in `.astro` components.
394+
You can use [`Astro.currentLocale`](https://docs.astro.build/en/reference/api-reference/#currentlocale) to read the current locale in `.astro` components.
395395

396396
The following example reads the current locale and uses it with the [`getRelativeLocaleUrl()`](https://docs.astro.build/en/reference/modules/astro-i18n/#getrelativelocaleurl) helper to generate a link to an about page in the current language:
397397

‎docs/src/content/docs/guides/overriding-components.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ In the following example, a component overriding Starlight's [`Footer`](/referen
141141
import type { Props } from '@astrojs/starlight/props';
142142
import Default from '@astrojs/starlight/components/Footer.astro';
143143
144-
const isHomepage = Astro.props.slug === '';
144+
const isHomepage = Astro.props.id === '';
145145
---
146146
147147
{

‎docs/src/content/docs/ko/components/using-components.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ sidebar:
99
링크 카드나 YouTube 삽입 등을 예로 들 수 있습니다.
1010
Starlight는 [MDX](https://mdxjs.com/)[Markdoc](https://markdoc.dev/) 파일에서 컴포넌트 사용을 지원하며 사용할 수 있는 몇 가지 공통 컴포넌트를 제공합니다.
1111

12-
[Astro 문서에서 컴포넌트 구축에 대해 자세히 알아보세요](https://docs.astro.build/ko/core-concepts/astro-components/).
12+
[Astro 문서에서 컴포넌트 구축에 대해 자세히 알아보세요](https://docs.astro.build/ko/basics/astro-components/).
1313

1414
## MDX에서 컴포넌트 사용
1515

@@ -30,7 +30,7 @@ import CustomCard from '../../components/CustomCard.astro';
3030
<CustomCard>컴포넌트에는 **중첩된 콘텐츠**가 포함될 수도 있습니다.</CustomCard>
3131
```
3232

33-
Starlight는 Astro로 구동되므로 [지원되는 UI 프레임워크(React, Preact, Svelte, Vue, Solid, Alpine)](https://docs.astro.build/ko/core-concepts/framework-components/)로 빌드된 컴포넌트를 MDX 파일에 추가할 수 있습니다.
33+
Starlight는 Astro로 구동되므로 [지원되는 UI 프레임워크(React, Preact, Svelte, Vue, Solid, Alpine)](https://docs.astro.build/ko/guides/framework-components/)로 빌드된 컴포넌트를 MDX 파일에 추가할 수 있습니다.
3434
Astro 문서에서 [MDX에서 컴포넌트 사용](https://docs.astro.build/ko/guides/integrations-guide/mdx/#mdx에서-컴포넌트-사용)에 대해 자세히 알아보세요.
3535

3636
## Markdoc에서 컴포넌트 사용

‎docs/src/content/docs/ko/environmental-impact.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,6 @@ JavaScript를 분석하고 컴파일하는 것은 브라우저가 수행해야
138138
[sf]: https://www.sciencefocus.com/science/what-is-the-carbon-footprint-of-the-internet/
139139
[bbc]: https://www.bbc.com/future/article/20200305-why-your-internet-habits-are-not-as-clean-as-you-think
140140
[http]: https://httparchive.org/reports/state-of-the-web
141-
[assets]: https://docs.astro.build/ko/guides/assets/
141+
[assets]: https://docs.astro.build/ko/guides/images/
142142
[islands]: https://docs.astro.build/ko/concepts/islands/
143143
[wcc]: https://www.websitecarbon.com/

‎docs/src/content/docs/ko/guides/authoring-content.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ title: 페이지 제목
4545

4646
## 이미지
4747

48-
Starlight의 이미지는 [Astro에 내장된 최적화된 자산 지원](https://docs.astro.build/ko/guides/assets/)을 사용합니다.
48+
Starlight의 이미지는 [Astro에 내장된 최적화된 자산 지원](https://docs.astro.build/ko/guides/images/)을 사용합니다.
4949

5050
Markdown 및 MDX는 스크린 리더 및 보조 기술에서 사용되는 대체 텍스트가 포함된 이미지를 표시하기 위한 Markdown 구문을 지원합니다.
5151

@@ -105,7 +105,7 @@ description: Starlight에 내장된 링크를 사용하는 방법
105105

106106
레벨 2 (`<h2>`) 및 레벨 3 (`<h3>`) 제목이 페이지 목차에 자동으로 나타납니다.
107107

108-
[Astro 공식 문서](https://docs.astro.build/ko/guides/markdown-content/#heading-ids)에서 Astro가 제목의 `id`를 처리하는 방법에 대해 자세히 알아보세요.
108+
[Astro 공식 문서](https://docs.astro.build/ko/guides/markdown-content/#제목-id)에서 Astro가 제목의 `id`를 처리하는 방법에 대해 자세히 알아보세요.
109109

110110
## 보조 내용
111111

@@ -144,12 +144,12 @@ npm create astro@latest -- --template starlight
144144

145145
:::tip[알고 계셨나요?]
146146

147-
Astro는 ["Islands Architecture"](https://docs.astro.build/ko/concepts/islands/)를 사용하여 더 빠른 웹사이트를 구축할 수 있도록 도와줍니다.
147+
Astro는 ["아일랜드 아키텍처"](https://docs.astro.build/ko/concepts/islands/)를 사용하여 더 빠른 웹사이트를 구축할 수 있도록 도와줍니다.
148148
:::
149149

150150
```md
151151
:::tip[알고 계셨나요?]
152-
Astro는 ["Islands Architecture"](https://docs.astro.build/ko/concepts/islands/)를 사용하여 더 빠른 웹사이트를 구축할 수 있도록 도와줍니다.
152+
Astro는 ["아일랜드 아키텍처"](https://docs.astro.build/ko/concepts/islands/)를 사용하여 더 빠른 웹사이트를 구축할 수 있도록 도와줍니다.
153153
:::
154154
```
155155

‎docs/src/content/docs/ko/guides/overriding-components.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ import Default from '@astrojs/starlight/components/SocialIcons.astro';
8484
사용자 정의 컴포넌트 내부에 내장 컴포넌트를 렌더링하는 경우:
8585

8686
- 전개 연산자를 사용하여 내장 컴포넌트에 `Astro.props`의 모든 속성을 전달합니다. 이를 통해, 내장 컴포넌트는 렌더링에 필요한 모든 데이터를 전달받습니다.
87-
- 기본 컴포넌트 내에 [`<slot />`](https://docs.astro.build/ko/core-concepts/astro-components/#슬롯)을 추가합니다. 이를 통해, 하위 컴포넌트를 전달받은 경우, Astro가 전달받은 컴포넌트를 렌더링할 위치를 알 수 있습니다.
87+
- 기본 컴포넌트 내에 [`<slot />`](https://docs.astro.build/ko/basics/astro-components/#슬롯)을 추가합니다. 이를 통해, 하위 컴포넌트를 전달받은 경우, Astro가 전달받은 컴포넌트를 렌더링할 위치를 알 수 있습니다.
8888

8989
[명명된 슬롯](https://docs.astro.build/ko/basics/astro-components/#명명된-슬롯)이 포함된 [`PageFrame`](/ko/reference/overrides/#pageframe) 또는 [`TwoColumnContent`](/ko/reference/overrides/#twocolumncontent) 컴포넌트를 재사용하는 경우 이러한 슬롯도 [전송](https://docs.astro.build/ko/basics/astro-components/#슬롯-전송)해야 합니다.
9090

@@ -155,4 +155,4 @@ const isHomepage = Astro.props.slug === '';
155155
}
156156
```
157157

158-
[Astro의 템플릿 구문 가이드](https://docs.astro.build/ko/core-concepts/astro-syntax/#dynamic-html)에서 조건부 렌더링에 대해 자세히 알아보세요.
158+
[Astro의 템플릿 구문 가이드](https://docs.astro.build/ko/basics/astro-syntax/#동적-html)에서 조건부 렌더링에 대해 자세히 알아보세요.

‎docs/src/content/docs/ko/guides/project-structure.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ description: Starlight 프로젝트에서 파일을 구성하는 방법을 알
55

66
이 가이드에서는 Starlight 프로젝트가 구성되는 방법과 프로젝트의 다양한 파일이 수행하는 작업을 보여줍니다.
77

8-
Starlight 프로젝트는 일반적으로 다른 Astro 프로젝트와 동일한 파일 및 디렉터리 구조를 따릅니다. 자세한 내용은 [Astro의 프로젝트 구조 문서](https://docs.astro.build/ko/core-concepts/project-structure/)를 참조하세요.
8+
Starlight 프로젝트는 일반적으로 다른 Astro 프로젝트와 동일한 파일 및 디렉터리 구조를 따릅니다. 자세한 내용은 [Astro의 프로젝트 구조 문서](https://docs.astro.build/ko/basics/project-structure/)를 참조하세요.
99

1010
## 파일 및 디렉터리
1111

1212
- `astro.config.mjs` — Starlight 통합 및 구성이 포함된 Astro 구성 파일 입니다.
13-
- `src/content/config.ts` — Starlight의 프론트매터 스키마를 프로젝트에 추가하는 콘텐츠 컬렉션 구성 파일입니다.
13+
- `src/content.config.ts` — Starlight의 프론트매터 스키마를 프로젝트에 추가하는 콘텐츠 컬렉션 구성 파일입니다.
1414
- `src/content/docs/` — 콘텐츠 파일들이 포함된 디렉터리입니다. Starlight는 이 디렉터리에 있는 `.md`, `.mdx` 또는 `.mdoc` 파일을 사이트의 페이지로 변환합니다.
1515
- `src/content/i18n/` (선택적) — [국제화](/ko/guides/i18n/)를 지원하는 번역 데이터들이 포함된 디렉터리입니다.
1616
- `src/` — 프로젝트의 기타 소스 코드 및 파일(컴포넌트, 스타일, 이미지 등)이 포함된 디렉터리입니다.
@@ -39,8 +39,7 @@ import { FileTree } from '@astrojs/starlight/components';
3939
- 01-getting-started.md
4040
- 02-advanced.md
4141
- index.mdx
42-
- config.ts
43-
- env.d.ts
42+
- content.config.ts
4443
- astro.config.mjs
4544
- package.json
4645
- tsconfig.json

‎docs/src/content/docs/ko/guides/site-search.mdx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,18 +124,19 @@ Starlight에 내장된 [국제화 시스템](/ko/guides/i18n/#starlight-ui-번
124124

125125
<Steps>
126126

127-
1. `src/content/config.ts` 파일의 DocSearch 스키마를 사용하여 Starlight의 `i18n` 콘텐츠 컬렉션 정의를 확장합니다.
127+
1. `src/content.config.ts` 파일의 DocSearch 스키마를 사용하여 Starlight의 `i18n` 콘텐츠 컬렉션 정의를 확장합니다.
128128

129-
```js ins={4} ins=/{ extend: .+ }/
130-
// src/content/config.ts
129+
```js ins={5} ins=/{ extend: .+ }/
130+
// src/content.config.ts
131131
import { defineCollection } from 'astro:content';
132+
import { docsLoader, i18nLoader } from '@astrojs/starlight/loaders';
132133
import { docsSchema, i18nSchema } from '@astrojs/starlight/schema';
133134
import { docSearchI18nSchema } from '@astrojs/starlight-docsearch/schema';
134135

135136
export const collections = {
136-
docs: defineCollection({ schema: docsSchema() }),
137+
docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),
137138
i18n: defineCollection({
138-
type: 'data',
139+
loader: i18nLoader(),
139140
schema: i18nSchema({ extend: docSearchI18nSchema() }),
140141
}),
141142
};

‎docs/src/content/docs/ko/index.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ description: Starlight로 아름답고 성능이 좋은 Astro 문서 웹 사이
77
template: splash
88
editUrl: false
99
lastUpdated: false
10+
banner:
11+
content: |
12+
Astro 5로 업데이트 하고 싶나요?
13+
<a href="https://github.com/withastro/starlight/releases/tag/%40astrojs/starlight%400.30.0">
14+
업그레이드 방법 알아보기
15+
</a>
1016
hero:
1117
title: Starlight로 멋진 문서를 만드세요
1218
tagline: 아름다운 문서 웹 사이트를 만드는데 필요한 모든 것. 빠르고, 접근성이 좋으며 사용하기 쉽습니다.

‎docs/src/content/docs/ko/manual-setup.mdx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,20 +61,24 @@ export default defineConfig({
6161

6262
### 콘텐츠 컬렉션 구성
6363

64-
Starlight는 `src/content/config.ts` 파일에 구성된 Astro의 [콘텐츠 컬렉션](https://docs.astro.build/ko/guides/content-collections/) 위에 구축되었습니다.
64+
Starlight는 `src/content.config.ts` 파일에 구성된 Astro의 [콘텐츠 컬렉션](https://docs.astro.build/ko/guides/content-collections/) 위에 구축되었습니다.
6565

66-
Starlight의 `docsSchema`를 사용하는 `docs` 컬렉션을 추가하여 콘텐츠 구성 파일을 생성하거나 업데이트하세요.
66+
Starlight의 `docsLoader``docsSchema`를 사용하는 `docs` 컬렉션을 추가하여 콘텐츠 구성 파일을 생성하거나 업데이트하세요.
6767

68-
```js ins={3,6}
69-
// src/content/config.ts
68+
```js ins={3-4,7}
69+
// src/content.config.ts
7070
import { defineCollection } from 'astro:content';
71+
import { docsLoader } from '@astrojs/starlight/loaders';
7172
import { docsSchema } from '@astrojs/starlight/schema';
7273

7374
export const collections = {
74-
docs: defineCollection({ schema: docsSchema() }),
75+
docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),
7576
};
7677
```
7778

79+
Starlight는 레거시 콘텐츠 컬렉션 구현을 사용하여 컬렉션을 처리하는 [`legacy.collections` 플래그](https://docs.astro.build/ko/reference/legacy-flags/)도 지원합니다.
80+
이 플래그는 기존 Astro 프로젝트가 있고 현재 로더를 사용하기 위해 컬렉션을 변경할 수 없는 경우에 유용합니다.
81+
7882
### 콘텐츠 추가
7983

8084
이제 Starlight가 구성되었으며 콘텐츠를 추가할 시간입니다!
@@ -123,6 +127,6 @@ import { FileTree } from '@astrojs/starlight/components';
123127

124128
### SSR과 함께 Starlight 사용
125129

126-
SSR을 사용하려면 Astro 문서에 있는 ["주문형 렌더링 어댑터"](https://docs.astro.build/ko/guides/server-side-rendering/) 가이드에 따라 Starlight 프로젝트에 서버 어댑터를 추가하세요.
130+
SSR을 사용하려면 Astro 문서에 있는 ["요청 시 렌더링 어댑터"](https://docs.astro.build/ko/guides/on-demand-rendering/) 가이드에 따라 Starlight 프로젝트에 서버 어댑터를 추가하세요.
127131

128132
Starlight에서 생성된 문서 페이지는 프로젝트의 출력 모드에 관계없이 기본적으로 미리 렌더링됩니다. Starlight 페이지의 사전 렌더링을 선택 해제하려면 [`prerender` 구성 옵션](/ko/reference/configuration/#prerender)`false`로 설정하세요.

‎docs/src/content/docs/ko/reference/configuration.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ Pagefind로 사이트 색인을 생성하지 않으려면 `false`로 설정하
467467
**타입:** `boolean`
468468
**기본값:** `true`
469469

470-
Starlight 페이지를 정적 HTML로 사전 렌더링할지, 아니면 [SSR 어댑터](https://docs.astro.build/ko/guides/server-side-rendering/)를 통해 주문형으로 렌더링할지 정의합니다.
470+
Starlight 페이지를 정적 HTML로 사전 렌더링할지, 아니면 [SSR 어댑터](https://docs.astro.build/ko/guides/on-demand-rendering/)를 통해 주문형으로 렌더링할지 정의합니다.
471471

472472
Starlight 페이지는 기본적으로 사전 렌더링됩니다.
473473
SSR 어댑터를 사용 중이고 Starlight 페이지를 주문형으로 렌더링하기를 원한다면 `prerender: false`를 설정하세요.
@@ -572,7 +572,7 @@ starlight({
572572
**타입:** `boolean`
573573
**기본값:** `false`
574574

575-
Starlight의 기본 [404 페이지](https://docs.astro.build/ko/core-concepts/astro-pages/#사용자-정의-404-오류-페이지) 삽입을 비활성화합니다. 프로젝트에서 사용자 정의 `src/pages/404.astro` 경로를 사용하려면 이 옵션을 `true`로 설정하세요.
575+
Starlight의 기본 [404 페이지](https://docs.astro.build/ko/basics/astro-pages/#사용자-정의-404-오류-페이지) 삽입을 비활성화합니다. 프로젝트에서 사용자 정의 `src/pages/404.astro` 경로를 사용하려면 이 옵션을 `true`로 설정하세요.
576576

577577
### `components`
578578

0 commit comments

Comments
 (0)