Skip to content

Update 09-collections.md collections translate korean #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
103 changes: 51 additions & 52 deletions _docs/step-by-step/09-collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,32 @@ layout: step
title: Collections
position: 9
---
Let's look at fleshing out authors so each author has their own page with a
blurb and the posts they've published.

To do this you'll use collections. Collections are similar to posts except the
content doesn't have to be grouped by date.
각 작성자가 자신의 페이지에 소개글과 자신이 게시한 글이 있도록 작성자를 구체화하는 방법을 살펴봅시다.

## Configuration
이를 위해 컬렉션을 사용합니다. 컬렉션은 게시물과 비슷하지만
콘텐츠를 날짜별로 그룹화할 필요가 없다는 점만 다릅니다.

To set up a collection you need to tell Jekyll about it. Jekyll configuration
happens in a file called `_config.yml` (by default).
## 설정

Create `_config.yml` in the root with the following:
컬렉션을 설정하려면 지킬에게 컬렉션에 대해 알려야 합니다. 지킬 구성
은 `_config.yml` (기본값) 라는 파일에서 이루어집니다.

다음을 참조하여 루트에 `_config.yml`을 생성합니다:

```yaml
collections:
authors:
```

To (re)load the configuration, restart the jekyll server. Press `Ctrl`+`C` in your terminal to stop the server, and then `jekyll serve` to restart it.
구성을 (재)로드하려면 jekyll 서버를 재시작해야합니다. 터미널에서 `Ctrl`+`C`를 눌러 서버를 중지한 다음 `jekyll serve`를 눌러 서버를 다시 시작합니다.

## Add authors

Documents (the items in a collection) live in a folder in the root of the site
named `_*collection_name*`. In this case, `_authors`.
문서(컬렉션의 항목)는 사이트 루트의 폴더에 `_*collection_name*`이라는 이름의 폴더에 있습니다.
이 경우 `_authors`입니다.

Create a document for each author:
각 작성자에 대한 문서:

`_authors/jill.md`:

Expand All @@ -52,12 +52,11 @@ position: Writer
Ted has been eating fruit since he was baby.
```

## Staff page
## 스태프 페이지

Let's add a page which lists all the authors on the site. Jekyll makes the
collection available at `site.authors`.
사이트의 모든 작성자를 나열하는 페이지를 추가해 보겠습니다. 지킬은 컬렉션을 `site.authors`에서 사용할 수 있도록 합니다.

Create `staff.html` and iterate over `site.authors` to output all the staff:
`staff.html`을 만들고 `site.authors`를 반복하여 모든 직원을 출력합니다:

{% raw %}
```liquid
Expand All @@ -83,9 +82,15 @@ Since the content is markdown, you need to run it through the
`markdownify` filter. This happens automatically when outputting using
{% raw %}`{{ content }}`{% endraw %} in a layout.

콘텐츠가 마크다운되어 있으므로 `markdownify` 필터를 통해 실행해야 합니다.
이는 레이아웃에서 {% raw %}`{{ content }}`{% endraw %} 사용하여 출력할 때 자동으로 발생합니다.

You also need a way to navigate to this page through the main navigation. Open
`_data/navigation.yml` and add an entry for the staff page:

또한 기본 탐색을 통해 이 페이지로 이동할 수 있는 방법이 필요합니다.
`_data/navigation.yml` 을 열고 직원 페이지에 대한 항목을 추가합니다:

```yaml
- name: Home
link: /
Expand All @@ -97,24 +102,26 @@ You also need a way to navigate to this page through the main navigation. Open
link: /staff.html
```

## Output a page
## 페이지 출력

기본적으로, 컬렉션은 문서 페이지를 출력하지 않습니다. 이 경우
각 작성자가 고유한 페이지를 갖기를 원하므로 컬렉션의
구성을 조정해 보겠습니다.

By default, collections do not output a page for documents. In this case we
want each author to have their own page so let's tweak the collection
configuration.
`config.yml`을 열고 작성자 컬렉션에 `output: true`를 추가합니다.
구성에 추가합니다.

Open `_config.yml` and add `output: true` to the author collection
configuration:
`config.yml`:

```yaml
collections:
authors:
output: true
```

You can link to the output page using `author.url`.
`author.url`을 사용하여 출력 페이지에 링크할 수 있습니다.

Add the link to the `staff.html` page:
`staff.html` 페이지에 링크를 추가합니다:

{% raw %}
```liquid
Expand All @@ -136,9 +143,9 @@ title: Staff
```
{% endraw %}

Just like posts you'll need to create a layout for authors.
글과 마찬가지로 작성자를 위한 레이아웃을 만들어야 합니다.

Create `_layouts/author.html` with the following content:
다음 내용으로 `_layouts/author.html`을 만듭니다:

{% raw %}
```liquid
Expand All @@ -152,20 +159,16 @@ layout: default
```
{% endraw %}

## Front matter defaults
## 프론트 기본값

Now you need to configure the author documents to use the `author` layout. You
could do this in the front matter like we have previously but that's getting
repetitive.
이제 '작성자' 레이아웃을 사용하도록 작성자 문서를 구성해야 합니다. 이전처럼 앞부분에서 이 작업을 수행할 수도 있지만 반복적인 작업이 됩니다.

What you really want is all posts to automatically have the post
layout, authors to have author and everything else to use the default.
실제로 원하는 것은 모든 글에 자동으로 글 레이아웃이 적용되고 작성자는 작성자, 그 외 모든 항목이 기본값을 사용하도록 하는 것입니다.

You can achieve this by using [front matter defaults](/docs/configuration/front-matter-defaults/)
in `_config.yml`. You set a scope of what the default applies to, then the
default front matter you'd like.
이를 달성하려면 `_config.yml` 파일에서 [앞에서 사용한 기본값](/docs/configuration/front-matter-defaults/)을 사용하면 됩니다.
그리고 기본값이 적용되는 범위를 설정한 다음 원하는 기본값을 설정합니다.

Add defaults for layouts to your `_config.yml`,
`_config.yml` 에서 원하는 기본값을 추가하세요:

```yaml
collections:
Expand All @@ -189,18 +192,16 @@ defaults:
layout: "default"
```

Now you can remove layout from the front matter of all pages and posts. Note
that any time you update `_config.yml` you'll need to restart Jekyll for the
changes to take effect.
이제 모든 페이지와 글의 앞부분에서 레이아웃을 제거할 수 있습니다.
참고로 `_config.yml`을 업데이트시 지킬을 다시 시작해야만 변경 사항을 적용할 수 있습니다.

## List author's posts

Let's list the posts an author has published on their page. To do
this you need to match the author `short_name` to the post `author`. You
use this to filter the posts by author.
작성자가 자신의 페이지에 게시한 글을 나열해 보겠습니다.
이렇게 하려면 작성자 `short_name`을 글 `author`와 일치시켜야 합니다.
필터를 사용하여 작성자별로 글을 필터링합니다.

Iterate over this filtered list in `_layouts/author.html` to output the
author's posts:
이 필터링된 목록을 `_layouts/author.html`에서 반복하여 작성자의 글을 출력합니다.

{% raw %}
```liquid
Expand All @@ -222,10 +223,10 @@ layout: default
```
{% endraw %}

## Link to authors page
## 작성자 페이지로 링크연결

The posts have a reference to the author so let's link it to the author's page.
You can do this using a similar filtering technique in `_layouts/post.html`:
글에 작성자에 대한 참조가 있으므로 작성자의 페이지로 연결해 보겠습니다.
`_layouts/post.html` 에서 유사한 필터링 기법을 사용하여 이 작업을 수행할 수 있습니다:

{% raw %}
```liquid
Expand All @@ -246,9 +247,7 @@ layout: default
```
{% endraw %}

Open up <a href="http://localhost:4000" target="_blank" data-proofer-ignore>http://localhost:4000</a> and
have a look at the staff page and the author links on posts to check everything
is linked together correctly.
<a href="http://localhost:4000" target="_blank" data-proofer-ignore>http://localhost:4000</a> 를 열고
스태프 페이지와 글의 작성자 링크를 확인하여 모든 항목이 올바르게 연결되어 있는지 확인합니다.

In the next and final step of this tutorial, we'll add polish to the site and
get it ready for a production deployment.
이 튜토리얼의 다음이자 마지막 단계에서는 사이트를 다듬고 배포를 준비하겠습니다.