Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 10 additions & 0 deletions src/content/docs/ko/reference/adapter-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,16 @@ Astro에서 생성한 빌드된 서버 엔트리 모듈입니다.

프리뷰 서버가 응답해야 하는 [구성된 허용된 호스트](/ko/reference/configuration-reference/#serverallowedhosts)를 설명합니다.

#### `PreviewServerParams.open`

<p>

**타입:** `string | boolean`<br />
<Since v="7.0.8" />
</p>

프리뷰 서버에 대해 [구성된 open 옵션](/ko/reference/configuration-reference/#serveropen)을 지정합니다.

#### `PreviewServerParams.root`

<p>
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/ko/reference/api-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1283,7 +1283,7 @@ content="

<p>

**타입**: `object | undefined`<br />
**타입**: [`AstroRuntimeLogger`](/ko/reference/logger-reference/#astroruntimelogger)
<Since v="7.0.0" />
</p>

Expand Down
34 changes: 18 additions & 16 deletions src/content/docs/ko/reference/astro-syntax.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const name = "Astro";

```astro title="src/components/DynamicAttributes.astro" "{name}" "${name}"
---
import MyComponent from "./MyComponent.astro";
const name = "Astro";
---
<h1 class={name}>속성 표현식이 지원됩니다</h1>
Expand Down Expand Up @@ -66,7 +67,7 @@ function handleClick () {
function handleClick () {
console.log("버튼이 클릭되었습니다!");
}
document.getElementById("button").addEventListener("click", handleClick);
document.getElementById("button")?.addEventListener("click", handleClick);
</script>
```
:::
Expand Down Expand Up @@ -242,7 +243,7 @@ if (Astro.slots.has('default')) {
import Shout from "../components/Shout.astro";
---
<Shout message="slots!">
{(message) => <div>{message}</div>}
{(message: string) => <div>{message}</div>}
</Shout>

<!-- <div>SLOTS!</div> 렌더링 -->
Expand All @@ -253,7 +254,7 @@ import Shout from "../components/Shout.astro";
```astro
<Shout message="slots!">
<fragment slot="message">
{(message) => <div>{message}</div>}
{(message: string) => <div>{message}</div>}
</fragment>
</Shout>
```
Expand All @@ -264,23 +265,24 @@ import Shout from "../components/Shout.astro";

`Astro.self`는 Astro 컴포넌트가 재귀적으로 호출될 수 있게 합니다. 이 동작은 컴포넌트 템플릿에서 `<Astro.self>`를 사용하여 Astro 컴포넌트를 자체적으로 렌더링할 수 있게 해줍니다. 이를 통해 대규모 데이터 저장소와 중첩된 데이터 구조를 반복 처리할 수 있습니다.

```astro
```astro title="src/components/NestedList.astro" {14}
---
// NestedList.astro
type Props = {
items: (string | string[])[];
};
const { items } = Astro.props;
---

<ul class="nested-list">
{items.map((item) => (
<li>
<!-- 중첩된 데이터 구조가 있는 경우 `<Astro.self>`를 렌더링하고 -->
<!-- 재귀 호출 시 props를 전달할 수 있습니다. -->
{Array.isArray(item) ? (
<Astro.self items={item} />
) : (
item
)}
</li>
))}
{
items.map((item) => (
<li>
{/* 중첩된 데이터 구조가 있는 경우 `<Astro.self>`를 렌더링합니다 */}
{/* 재귀 호출을 통해 props를 전달할 수 있습니다 */}
{Array.isArray(item) ? <Astro.self items={item} /> : item}
</li>
))
}
</ul>
```

Expand Down
24 changes: 14 additions & 10 deletions src/content/docs/ko/reference/cli-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -113,18 +113,20 @@ Global Flags
astro dev [command] [...flags]

Commands
stop Stop a running background dev server.
status Check if a dev server is running.
logs [--follow] View logs from a background dev server.
stop Stop a running background dev server.
status Check if a dev server is running.
logs [--follow] View logs from a background dev server.

Flags
--background Start the dev server as a background process.
--port Specify which port to run on. Defaults to 4321.
--host Listen on all addresses, including LAN and public addresses.
--host <custom-address> Expose on a network IP address at <custom-address>
--open Automatically open the app in the browser on server start
--force Clear the content layer cache, forcing a full rebuild.
--help (-h) See all available flags.
--background Start the dev server as a background process.
--mode Specify the mode of the project. Defaults to "development".
--port Specify which port to run on. Defaults to 4321.
--host Listen on all addresses, including LAN and public addresses.
--host <custom-address> Expose on a network IP address at <custom-address>
--open Automatically open the app in the browser on server start
--force Clear the content layer cache, forcing a full rebuild.
--allowed-hosts Specify a comma-separated list of allowed hosts or allow any hostname.
--help (-h) See all available flags.
```

:::note
Expand Down Expand Up @@ -195,6 +197,8 @@ Astro 개발 서버가 실행 중인 터미널에서 다음 단축키를 사용

<p><Since v="7.0.0" /></p>

이 명령어는 [공통 플래그](#공통-플래그)와 다음과 같은 추가 플래그를 허용합니다.

#### `--background`

개발 서버를 독립된 백그라운드 프로세스로 시작하고 [JSON 로깅](#--json)을 활성화합니다. 이 플래그는 AI 에이전트가 감지되면 자동으로 추가됩니다. 필요에 따라 직접 사용할 수도 있습니다.
Expand Down
10 changes: 10 additions & 0 deletions src/content/docs/ko/reference/logger-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,16 @@ export default defineConfig({

다음 타입들은 `astro`에서 가져올 수 있습니다.

### `AstroRuntimeLogger`

<p>

**타입:** `{ info: (message: string) => void; warn: (message: string) => void; error: (message: string) => void; }`<br />
<Since v="7.0.8" />
</p>

페이지 렌더링 중 추가 로그를 남기기 위해 [런타임에 사용할 수 있는 `logger` 메서드](/ko/reference/api-reference/#logger)를 설명합니다.

### `AstroLoggerDestination`

사용자 정의 로거가 구현해야 하는 인터페이스입니다.
Expand Down
Loading