From 76de31b38df9343d87126c7d7ec9f5e1399e0ce4 Mon Sep 17 00:00:00 2001 From: Junseong Park Date: Sat, 26 Oct 2024 14:48:38 +0900 Subject: [PATCH 1/2] i18n(ko-KR): update `content-collections.mdx` --- src/content/docs/ko/guides/content-collections.mdx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/content/docs/ko/guides/content-collections.mdx b/src/content/docs/ko/guides/content-collections.mdx index 55614519b4132..93b2f15c147e2 100644 --- a/src/content/docs/ko/guides/content-collections.mdx +++ b/src/content/docs/ko/guides/content-collections.mdx @@ -306,7 +306,7 @@ relatedPosts: ### 사용자 정의 슬러그 정의 -`type: 'content'`를 사용하면 모든 콘텐츠 항목은 해당 [파일 `id`](/ko/reference/api-reference/#id)에서 URL 친화적인 `slug` 속성을 생성합니다. 슬러그는 컬렉션에서 직접 항목을 쿼리하는 데 사용됩니다. 콘텐츠에서 새 페이지와 URL을 만들 때도 유용합니다. +`type: 'content'`를 사용하면 모든 콘텐츠 항목은 해당 [파일 `id`](/ko/reference/modules/astro-content/#id)에서 URL 친화적인 `slug` 속성을 생성합니다. 슬러그는 컬렉션에서 직접 항목을 쿼리하는 데 사용됩니다. 콘텐츠에서 새 페이지와 URL을 만들 때도 유용합니다. 파일 앞부분에 자신만의 `slug` 속성을 추가하여 항목에서 생성된 슬러그를 재정의할 수 있습니다. 이는 다른 웹 프레임워크의 "permalink" 기능과 유사합니다. `"slug"`는 사용자 정의 컬렉션 `스키마`에서 허용되지 않는 특수 예약 속성 이름이며 항목의 `data` 속성에 표시되지 않습니다. @@ -320,7 +320,7 @@ slug: my-custom-slug/supports/slashes ## 컬렉션 쿼리 -Astro는 컬렉션을 쿼리하고 하나 이상의 콘텐츠 항목을 반환하는 두 가지 함수를 제공합니다: [`getCollection()`](/ko/reference/api-reference/#getcollection) 및 [`getEntry()`](/ko/reference/api-reference/#getentry). +Astro는 컬렉션을 쿼리하고 하나 이상의 콘텐츠 항목을 반환하는 두 가지 함수를 제공합니다: [`getCollection()`](/ko/reference/modules/astro-content/#getcollection) 및 [`getEntry()`](/ko/reference/modules/astro-content/#getentry). ```js import { getCollection, getEntry } from 'astro:content'; @@ -337,7 +337,7 @@ const allBlogPosts = await getCollection('blog'); const graceHopperProfile = await getEntry('authors', 'grace-hopper'); ``` -두 함수 모두 [`CollectionEntry`](/ko/reference/api-reference/#컬렉션-항목-타입) 타입에 정의된 대로 콘텐츠 항목을 반환합니다. +두 함수 모두 [`CollectionEntry`](/ko/reference/modules/astro-content/#collectionentry) 타입에 정의된 대로 콘텐츠 항목을 반환합니다. ### 참조 데이터 엑세스 @@ -432,7 +432,7 @@ const blogEntries = await getCollection('blog'); 컴포넌트는 전체 콘텐츠 항목을 prop으로 전달할 수도 있습니다. -이렇게 하면 TypeScript를 사용하여 컴포넌트 props의 타입을 올바르게 구성하기 위해 [`CollectionEntry`](/ko/reference/api-reference/#컬렉션-항목-타입) 유틸리티를 사용할 수 있습니다. 이 유틸리티는 컬렉션 스키마 이름과 일치하는 문자열 인수를 사용하고 해당 컬렉션 스키마의 모든 속성을 상속합니다. +이렇게 하면 TypeScript를 사용하여 컴포넌트 props의 타입을 올바르게 구성하기 위해 [`CollectionEntry`](/ko/reference/modules/astro-content/#collectionentry) 유틸리티를 사용할 수 있습니다. 이 유틸리티는 컬렉션 스키마 이름과 일치하는 문자열 인수를 사용하고 해당 컬렉션 스키마의 모든 속성을 상속합니다. ```astro /CollectionEntry(?:<.+>)?/ --- @@ -470,7 +470,7 @@ const { Content, headings } = await entry.render(); ### 정적 출력을 위한 빌드 (기본값) -정적 웹 사이트 (Astro의 기본 동작)를 구축하는 경우 [`getStaticPaths()`](/ko/reference/api-reference/#getstaticpaths) 함수를 사용하여 빌드하는 동안 단일 `src/pages/` 컴포넌트에서 여러 페이지를 만듭니다. +정적 웹 사이트 (Astro의 기본 동작)를 구축하는 경우 [`getStaticPaths()`](/ko/reference/modules/astro-content/#getstaticpaths) 함수를 사용하여 빌드하는 동안 단일 `src/pages/` 컴포넌트에서 여러 페이지를 만듭니다. [콘텐츠 또는 데이터 컬렉션을 쿼리](/ko/guides/content-collections/#컬렉션-쿼리)하려면 `getStaticPaths()`에서 `getCollection()`을 호출하세요. 그런 다음 각 콘텐츠 항목의 `slug` 속성 (콘텐츠 컬렉션) 또는 `id` 속성 (데이터 컬렉션)을 사용하여 새 URL 경로를 생성합니다. @@ -501,7 +501,7 @@ const { Content } = await entry.render(); ### 서버 출력용 빌드 (SSR) -Astro의 SSR 지원을 사용하여 동적 웹 사이트를 구축하는 경우 빌드 중 미리 경로를 생성할 것으로 예상되지 않습니다. 대신 페이지에서는 요청 (`Astro.request` 또는 `Astro.params` 사용)을 검사하여 필요에 따라 슬러그를 찾은 다음 [`getEntry()`](/ko/reference/api-reference/#getentry)를 사용하여 가져와야 합니다. +Astro의 SSR 지원을 사용하여 동적 웹 사이트를 구축하는 경우 빌드 중 미리 경로를 생성할 것으로 예상되지 않습니다. 대신 페이지에서는 요청 (`Astro.request` 또는 `Astro.params` 사용)을 검사하여 필요에 따라 슬러그를 찾은 다음 [`getEntry()`](/ko/reference/modules/astro-content/#getentry)를 사용하여 가져와야 합니다. ```astro --- From 69b3c4457323ee13785726cc757660afdf064609 Mon Sep 17 00:00:00 2001 From: Junseong Park Date: Sat, 26 Oct 2024 22:24:22 +0900 Subject: [PATCH 2/2] fix: update wrong link --- src/content/docs/ko/guides/content-collections.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/content/docs/ko/guides/content-collections.mdx b/src/content/docs/ko/guides/content-collections.mdx index 93b2f15c147e2..827339e87f9ce 100644 --- a/src/content/docs/ko/guides/content-collections.mdx +++ b/src/content/docs/ko/guides/content-collections.mdx @@ -51,7 +51,7 @@ Astro는 프로젝트의 `.astro` 디렉터리에 콘텐츠 컬렉션을 위한 - src/content/ - - **newsletter/** + - **newsletter/** - week-1.md - week-2.md - **blog/** @@ -470,7 +470,7 @@ const { Content, headings } = await entry.render(); ### 정적 출력을 위한 빌드 (기본값) -정적 웹 사이트 (Astro의 기본 동작)를 구축하는 경우 [`getStaticPaths()`](/ko/reference/modules/astro-content/#getstaticpaths) 함수를 사용하여 빌드하는 동안 단일 `src/pages/` 컴포넌트에서 여러 페이지를 만듭니다. +정적 웹 사이트 (Astro의 기본 동작)를 구축하는 경우 [`getStaticPaths()`](/ko/reference/api-reference/#getstaticpaths) 함수를 사용하여 빌드하는 동안 단일 `src/pages/` 컴포넌트에서 여러 페이지를 만듭니다. [콘텐츠 또는 데이터 컬렉션을 쿼리](/ko/guides/content-collections/#컬렉션-쿼리)하려면 `getStaticPaths()`에서 `getCollection()`을 호출하세요. 그런 다음 각 콘텐츠 항목의 `slug` 속성 (콘텐츠 컬렉션) 또는 `id` 속성 (데이터 컬렉션)을 사용하여 새 URL 경로를 생성합니다. @@ -530,7 +530,7 @@ const { Content } = await entry.render(); ## 파일 기반 라우팅에서 마이그레이션 `src/pages/` 디렉터리의 하위 폴더에 있는 Markdown 또는 MDX 파일을 사용하는 블로그와 같은 기존 Astro 프로젝트가 있는 경우 관련 콘텐츠 또는 데이터 파일을 콘텐츠 컬렉션으로 마이그레이션하는 것을 고려하세요. - + [블로그 만들기 튜토리얼의 완성된 프로젝트](https://github.com/withastro/blog-tutorial-demo)의 코드베이스를 사용하는 [단계별 튜토리얼](/ko/tutorials/add-content-collections/)에서 기본 블로그 예시를 `src/pages/posts/` 디렉터리에서 `src/content/posts` 디렉터리로 변환하는 방법을 알아보세요. ## JSON 스키마 생성 활성화