Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

Commit 6ae49ac

Browse files
authored
Merge pull request #36 from wanybae/translation-ko
Translation ko/faq
2 parents 9c932cd + b4a43cc commit 6ae49ac

18 files changed

+849
-0
lines changed

ko/faq/async-data-components.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: 컴포넌트에서의 비동기 데이터
3+
description: 컴포넌트에서 비동기 데이터를 다루려면?
4+
---
5+
6+
<!-- title: Async data in components -->
7+
<!-- description: Async data in components? -->
8+
9+
<!-- # Async data in components? -->
10+
11+
# 컴포넌트에서 비동기 데이터를 다루려면?
12+
13+
<!-- It is not possible because it's not linked to a route, Nuxt.js supercharges the component data() associated to a route to allow async data. -->
14+
15+
컴포넌트는 라우트에 연결되어 있지 않기 때문에 비동기 데이터를 다룰 수 없습니다. Nuxt.js 에서는 라우트에 연결된 컴포넌트의 data() 메소드에 좀 손을 써서 비동기 데이터를 다룰수 있게 합니다.
16+
17+
<!-- For sub components, there are 2 ways of achieving it: -->
18+
19+
しかしながら、서브 컴포넌트(역주: components 디렉토리에 있는 컴포넌트를 말함)에서도 비동기 데이터를 다룰수 있도록 하는 방법이 두가지가 있습니다:
20+
21+
<!-- 1. Making the API call in the mounted() hook and setting the data afterwards, downside: no server rendering -->
22+
<!-- 2. Making the API call in the data() of the page component and giving the data as a prop to the subComponent: server rendering OK. But the data() of the page might be less readable because it's loading the async data of the sub components -->
23+
24+
1. mounted() 훅에 API 콜을 작성하고 그 콜 이후에 데이터를 세팅하는 방법. 단점은 서버사이드 랜더링이 불가능하게 됩니다.
25+
2. 페이지 컴포넌트의 data() 메소드에서 API 콜을 작성하고 데이터를 프로퍼티로 서브 컴포넌트에게 넘기는 방법. 이 방법에서는 서버사이드 랜더링이 가능합니다. 그러나, 페이지의 data() 메소드가 서브 컴포넌트의 비동기 데이터를 로딩하기 때문에 코드의 가독성이 떨어지게 될수도 있습니다.
26+
27+
<!-- It all depends if you want the sub components to be server-rendered or not. -->
28+
29+
어느쪽을 선택할지에 대해서는 서브 컴포넌트를 서버사이드 랜더링을 할지에 대한 여부에 달려있다고 볼수 있을것 같습니다.

ko/faq/css-flash.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: CSS Flash
3+
description: 왜 CSS Flash 가 보이는지?
4+
---
5+
6+
<!-- title: CSS Flash -->
7+
<!-- description: Why a CSS Flash appears with Nuxt.js? -->
8+
9+
<!-- # Why a CSS Flash appears? -->
10+
11+
# 왜 CSS Flash 가 보이는지?
12+
13+
![cssflash](/flash_css.gif)
14+
15+
<!-- This is because the CSS is in the JavaScript build in **development mode** to allow hot-reloading via Webpack. -->
16+
17+
이게 보이는 것은 Webpack 을 통해 핫리로딩하는 **개발모드** 에서 빌드한 JavaScript 안에 CSS 가 작성되어 있기 때문입니다.
18+
19+
<!-- Don't worry in production mode, the CSS is separated and put in the header so this "flash" does not appear anymore. -->
20+
21+
그러니 걱정마세요. 프로덕션 모드에서는 CSS 는 분리되어서 head 에 위치하기 때문에, 이런 "flash" 현상은 보이지 않습니다.

ko/faq/dokku-deployment.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
title: Dokku 를 사용한 배포
3+
description: Dokku 를 사용하여 배포하려면?
4+
---
5+
6+
<!-- title: Dokku Deployment -->
7+
<!-- description: How to deploy Nuxt.js on Dokku? -->
8+
9+
<!-- # How to deploy on Dokku? -->
10+
11+
# Dokku 를 사용하여 배포하려면?
12+
13+
<!-- We recommend to read [Dokku documentation for the setup](http://dokku.viewdocs.io/dokku/getting-started/installation/) and [Deploying a Node.js Application on Digital Ocean using dokku](http://jakeklassen.com/post/deploying-a-node-app-on-digital-ocean-using-dokku/) -->
14+
15+
[Dokku 셋업 문서](http://dokku.viewdocs.io/dokku/getting-started/installation/)[디지털 대양의 Node.js 어플리케이션을 dokku를 사용하여 배포하기 ](http://jakeklassen.com/post/deploying-a-node-app-on-digital-ocean-using-dokku/)를 추천합니다.
16+
17+
<!-- For the example, we will call our nuxt.js application `my-nuxt-app` -->
18+
19+
한 예로, nuxt.js 어플리케이션을 `my-nuxt-app`이라고 부르겠습니다.
20+
21+
<!-- We need to tell Dokku to install the `devDependencies` of the project (to be able to launch `npm run build`): -->
22+
23+
`npm run build`를 사용하기 위해서 프로젝트의 `devDependencies`를 설치하도록 Dokku에게 요청할 필요가 있습니다:
24+
25+
```bash
26+
// on Dokku Server
27+
dokku config:set my-nuxt-app NPM_CONFIG_PRODUCTION=false
28+
```
29+
30+
<!-- Also, we want our application to listen on the port `0.0.0.0` and run in production mode: -->
31+
32+
또한 어플리케이션에게 `0.0.0.0` 포트를 리슨하도록 하고, 프로덕션 모드로 기동하도록 합니다:
33+
```bash
34+
// on Dokku Server
35+
dokku config:set my-nuxt-app HOST=0.0.0.0 NODE_ENV=production
36+
```
37+
38+
<!-- You should see these 3 line when you type `dokku config my-nuxt-app` -->
39+
40+
`dokku config my-nuxt-app`을 실행하면 다음 3줄을 보게 될텐데요.
41+
42+
![nuxt config vars Dokku](https://i.imgur.com/9FNsaoQ.png)
43+
44+
<!-- Then, we tell Dokku to launch `npm run build` via the `scripts.dokku.predeploy` script in our project `app.json`:
45+
`create a file name app.json in our project root folder` -->
46+
47+
그럼 `app.json`화일의 `scripts.dokku.predeploy``npm run build`를 Dokku에서 실행하도록 합니다:
48+
`프로젝트의 루트 폴더에 app.json을 생성합니다.`
49+
```js
50+
{
51+
"scripts": {
52+
"dokku": {
53+
"predeploy": "npm run build"
54+
}
55+
}
56+
}
57+
```
58+
59+
<!-- Finally, we can push our app on Dokku with: -->
60+
61+
이걸로 앱을 Dokku에 git push 할 수 있게 되었습니다:
62+
```bash
63+
// commit your change before push.
64+
git remote add dokku dokku@yourServer:my-nuxt-app
65+
git push dokku master
66+
```
67+
68+
<!-- Voilà! Our nuxt.js application is now hosted on Dokku! -->
69+
70+
자! 이제 nuxt.js 어플리케이션이 Dokku위에서 호스팅 됩니다.

ko/faq/duplicated-meta-tags.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
title: 중복된 메타태그
3+
description: 메타태그가 중복된 경우에는?
4+
---
5+
6+
<!-- title: Duplicated Meta tags -->
7+
<!-- description: Duplicated Meta tags with Nuxt.js? -->
8+
9+
<!-- # Duplicated Meta tags? -->
10+
11+
# 메타태그가 중복된 경우에는?
12+
13+
<!-- This is a "feature" of [vue-meta](https://github.com/declandewet/vue-meta), please take a look at the [documentation of head elements](/guide/views#html-head). -->
14+
15+
이것은 [vue-meta](https://github.com/declandewet/vue-meta)의 "특징" 입니다. [head 요소 문서](/guide/views#html-head-정보)를 참고해 주세요.
16+
17+
<!-- \> To avoid any duplication when used in child component, please give a unique identifier with the hid key, please [read more](https://github.com/declandewet/vue-meta#lists-of-tags) about it. -->
18+
19+
컴포넌트에서 vue-meta 를 사용할 때, 중복을 피하기 위해서는 유일한 식별자를 hid 키에 붙여서 사용합니다. 자세한 내용은 [vue-meta 테그 리스트](https://github.com/declandewet/vue-meta#lists-of-tags)를 참고해 주세요.
20+
21+
<!-- For the meta description, you need to add the unique identifier `hid` so vue-meta will know that it has to overwrite the default tag. -->
22+
23+
예를들어서 description 메타태그에는 `hid`라는 유일한 식별자를 붙여야 합니다. 그러면 vue-meta 는 디폴트 태그를 덮어써야 한다는 것을 알게 될 것입니다.
24+
25+
<!-- Your `nuxt.config.js`: -->
26+
27+
`nuxt.config.js`:
28+
29+
```js
30+
...head: {
31+
title: 'starter',
32+
meta: [
33+
{ charset: 'utf-8' },
34+
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
35+
{ name: 'keywords', content: 'keyword 1, keyword 2'},
36+
{ hid: 'description', name: 'description', content: 'This is the generic description.'}
37+
],
38+
},
39+
...
40+
```
41+
42+
<!-- An then in your individual page: -->
43+
44+
그리고 개별페이지에는 다음과 같이 작성합니다:
45+
46+
```js
47+
export default {
48+
head () {
49+
return {
50+
title: `Page 1 (${this.name}-side)`,
51+
meta: [
52+
{ hid: 'description', name: 'description', content: "Page 1 description" }
53+
],
54+
}
55+
}
56+
}
57+
```
58+
59+
<!-- To learn how to use the `head` property in your pages, please see the [HTML head documentation](/guide/views#html-head). -->
60+
61+
페이지의 `head` 프로퍼티의 자세한 사용방법에 대해서는 [HTML head 정보 문서](/guide/views#html-head-정보)를 참고해 주세요.

ko/faq/extend-webpack.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: Webpack 설정의 확장
3+
description: Webpack 설정을 확장하려면?
4+
---
5+
6+
<!-- title: Extend Webpack -->
7+
<!-- description: How to extend webpack config? -->
8+
9+
<!-- # How to extend webpack config? -->
10+
11+
# Webpack 설정을 확장하려면?
12+
13+
<!-- You can extend the webpack configuration via the `extend` option in your `nuxt.config.js`: -->
14+
15+
`nuxt.config.js``extend` 옵션에 Webpack 설정을 확장할 수 있습니다:
16+
17+
```js
18+
module.exports = {
19+
build: {
20+
extend (config, { isDev, isClient }) {
21+
// ...
22+
}
23+
}
24+
}
25+
```

ko/faq/external-resources.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
title: 외부 리소스
3+
description: Nuxt.js 에서 외부 리소스를 사용하려면?
4+
---
5+
6+
<!-- title: External resources -->
7+
<!-- description: How to use external resources with Nuxt.js? -->
8+
9+
<!-- # How to use external resources? -->
10+
11+
# 외부 리소스를 사용하려면?
12+
13+
<!-- ## Global Settings -->
14+
15+
## 글로벌 설정
16+
17+
<!-- Include your resources in the `nuxt.config.js` file: -->
18+
19+
`nuxt.config.js` 화일 안에 리소스를 include합니다:
20+
21+
```js
22+
module.exports = {
23+
head: {
24+
script: [
25+
{ src: 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js' }
26+
],
27+
link: [
28+
{ rel: 'stylesheet', href: 'https://fonts.googleapis.com/css?family=Roboto' }
29+
]
30+
}
31+
}
32+
```
33+
34+
<!-- ## Local Settings -->
35+
36+
## 로컬 설정
37+
38+
<!-- Include your resources in your .vue file inside the pages directory: -->
39+
40+
pages 디렉토리의 .vue 화일 안에서 리소스를 include합니다:
41+
42+
```html
43+
<template>
44+
<h1>About page with jQuery and Roboto font</h1>
45+
</template>
46+
47+
<script>
48+
export default {
49+
head: {
50+
script: [
51+
{ src: 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js' }
52+
],
53+
link: [
54+
{ rel: 'stylesheet', href: 'https://fonts.googleapis.com/css?family=Roboto' }
55+
]
56+
}
57+
}
58+
</script>
59+
```

ko/faq/github-pages.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
title: GitHub Pages 에 배포하기
3+
description: GitHub Pages 에 배포하려면?
4+
---
5+
6+
<!-- title: GitHub Pages Deployment -->
7+
<!-- description: How to deploy Nuxt.js on GitHub Pages? -->
8+
9+
<!-- # How to deploy on GitHub Pages? -->
10+
11+
# GitHub Pages 에 배포하려면?
12+
13+
<!-- Nuxt.js gives you the possibility to host your web application on any static hosting like [GitHub Pages](https://pages.github.com/) for example. -->
14+
15+
Nuxt.js를 사용하면, 예를들어 [GitHub Pages](https://pages.github.com/)과 같은 정적호스팅 서비스에서 웹어플리케이션을 호스팅할 수 있습니다.
16+
17+
<!-- To deploy on GitHub Pages, you need to generate your static web application: -->
18+
19+
GitHub Pages에 배포하려면 정적 웹어플리케이션을 생성해야 합니다:
20+
21+
```bash
22+
npm run generate
23+
```
24+
25+
<!-- It will create a `dist` folder with everything inside ready to be deployed on GitHub Pages hosting. -->
26+
27+
이때 `dist` 폴더가 생성되는데, 그 안에 GitHub pages에 배포될 모든것이 들어가 있습니다.
28+
29+
<!-- Branch `gh-pages` for project repository OR branch `master` for user or organization site -->
30+
31+
프로젝트 리포지토리라면 `gh-pages` 브랜치, 사용자 혹은 조직 사이트라면 `master` 브랜치를 지정하세요.
32+
33+
<!-- <p class="Alert Alert--nuxt-green"><b>INFO:</b> If you use a custom domain for your GitHub Pages and put `CNAME` file, it is recommended that CNAME file is put in the `static` directory. [More documentation](/guide/assets#static) about it.</p> -->
34+
35+
<p class="Alert Alert--nuxt-green"><b>정보:</b> GitHub Pages에서 독립도메인을 사용하기 위해서 `CNAME` 화일을 사용한다면, `CNAME` 화일은 `static` 디렉토리에 위치시키는게 좋습니다. 자세한 내용은 [webpack에서 다루지 않는 정적 화일](/guide/assets#webpack-에서-다루지-않는-정적-화일)을 참고해 주세요.</p>
36+
37+
<!-- ## Command line deployment -->
38+
39+
## 커맨드라인에서 배포하기
40+
41+
<!-- You can also use [push-dir package](https://github.com/L33T-KR3W/push-dir): -->
42+
43+
[push-dir package](https://github.com/L33T-KR3W/push-dir)를 사용하는 것도 가능합니다:
44+
45+
<!-- First install it via npm: -->
46+
47+
우선은 npm 으로 설치하세요:
48+
49+
```bash
50+
npm install push-dir --save-dev
51+
```
52+
53+
<!-- Add a `deploy` command to your package.json with the branch as `gh-pages` for project repository OR `master` for user or organization site. -->
54+
55+
`deploy` 커맨드를 package.json에 추가해 주세요. 브랜치는 프로젝트 리포지토리라면 `gh-pages` 브랜치를, 사용자 혹은 조직 사이트라면 `master` 브랜치를 지정해 주세요.
56+
57+
```js
58+
"scripts": {
59+
"dev": "nuxt",
60+
"build": "nuxt build",
61+
"start": "nuxt start",
62+
"generate": "nuxt generate",
63+
"deploy": "push-dir --dir=dist --branch=gh-pages --cleanup"
64+
},
65+
```
66+
67+
<!-- Then generate and deploy your static application: -->
68+
69+
자, 정적 어플리케이션을 생성하고 배포하세요!:
70+
71+
```bash
72+
npm run generate
73+
npm run deploy
74+
```

0 commit comments

Comments
 (0)