Skip to content
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
7 changes: 7 additions & 0 deletions src/content/docs/ko/basics/layouts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import ReadMore from '~/components/ReadMore.astro'

하지만 레이아웃 컴포넌트에는 특별한 것이 없습니다! 다른 Astro 컴포넌트처럼 [props를 전달](/ko/basics/astro-components/#컴포넌트-props)받고 [다른 컴포넌트를 가져와 사용](/ko/basics/astro-components/#컴포넌트-구조)할 수 있습니다. 여기에는 [UI 프레임워크 컴포넌트](/ko/guides/framework-components/)와 [클라이언트 측 스크립트](/ko/guides/client-side-scripts/)가 포함될 수 있습니다. 전체 페이지 셸을 제공할 필요도 없으며 대신 부분 UI 템플릿으로 사용할 수 있습니다.

그러나 레이아웃 컴포넌트에 페이지 셸이 포함되어 있는 경우 `<html>` 요소는 컴포넌트에 있는 다른 모든 요소의 상위 요소여야 합니다. 모든 [`<style>`](/ko/guides/styling/#astro에서-스타일링하기) 또는 [`<script>`](/ko/guides/client-side-scripts/#astro에서-script-사용하기) 요소를 `<html>` 태그로 묶어야 합니다.

레이아웃 컴포넌트는 일반적으로 프로젝트의 `src/layouts` 디렉터리에 배치되지만 이는 필수 사항은 아닙니다. 프로젝트의 어느 곳에나 배치하도록 선택할 수 있습니다. 심지어 [레이아웃 이름 앞에 `_`를 붙이면](/ko/guides/routing/#페이지-제외) 레이아웃 컴포넌트와 페이지를 같은 위치에 배치할 수도 있습니다.

## 레이아웃 예시
Expand Down Expand Up @@ -43,6 +45,11 @@ const { title } = Astro.props;
</article>
<Footer />
</body>
<style>
h1 {
font-size: 2rem;
}
</style>
</html>
```

Expand Down