Skip to content

Commit c518146

Browse files
authored
Merge pull request #8 from kubernetes/master
merge
2 parents 1e1c5bc + d3c68aa commit c518146

File tree

626 files changed

+26109
-18477
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

626 files changed

+26109
-18477
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ charset = utf-8
55
max_line_length = 80
66
trim_trailing_whitespace = true
77

8+
[*.md]
9+
trim_trailing_whitespace = false
10+
811
[*.{css,html,js,json,sass,md,mmark,toml,yaml}]
912
indent_style = space
1013
indent_size = 2

.github/OWNERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# See the OWNERS docs at https://go.k8s.io/owners
2+
3+
reviewers:
4+
- sig-docs-en-reviews # Defined in OWNERS_ALIASES
5+
6+
approvers:
7+
- sig-docs-en-owners # Defined in OWNERS_ALIASES

.github/workflows/OWNERS

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# See the OWNERS docs at https://go.k8s.io/owners
2+
3+
# When modifying this file, consider the security implications of
4+
# allowing listed reviewers / approvals to modify or remove any
5+
# configured GitHub Actions.
6+
7+
reviewers:
8+
- sig-docs-leads
9+
10+
approvers:
11+
- sig-docs-leads

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ RUN apk add --no-cache \
1616
build-base \
1717
libc6-compat \
1818
npm && \
19-
npm install -G autoprefixer postcss-cli
19+
npm install -D autoprefixer postcss-cli
2020

2121
ARG HUGO_VERSION
2222

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ container-image:
6565
--build-arg HUGO_VERSION=$(HUGO_VERSION)
6666

6767
container-build: module-check
68-
$(CONTAINER_RUN) --read-only $(CONTAINER_IMAGE) hugo --minify
68+
$(CONTAINER_RUN) --read-only --mount type=tmpfs,destination=/tmp,tmpfs-mode=01777 $(CONTAINER_IMAGE) sh -c "npm ci && hugo --minify"
6969

7070
container-serve: module-check
7171
$(CONTAINER_RUN) --read-only --mount type=tmpfs,destination=/tmp,tmpfs-mode=01777 -p 1313:1313 $(CONTAINER_IMAGE) hugo server --buildFuture --bind 0.0.0.0 --destination /tmp/hugo --cleanDestinationDir

OWNERS_ALIASES

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,11 @@ aliases:
120120
- bells17
121121
# cstoku
122122
- inductor
123+
- kakts
123124
- makocchi-git
124125
# MasayaAoyama
125126
- nasa9084
126-
- oke-py
127+
# oke-py
127128
sig-docs-ko-owners: # Admins for Korean content
128129
- ClaudiaJKang
129130
- gochist

README-ja.md

Lines changed: 76 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,100 @@
44

55
このリポジトリには、[KubernetesのWebサイトとドキュメント](https://kubernetes.io/)をビルドするために必要な全アセットが格納されています。貢献に興味を持っていただきありがとうございます!
66

7-
## Hugoを使ってローカル環境でWebサイトを動かす
7+
# リポジトリの使い方
88

9-
Hugoのインストール方法については[Hugoの公式ドキュメント](https://gohugo.io/getting-started/installing/)をご覧ください。このとき、[`netlify.toml`](netlify.toml#L10)ファイルに記述されている`HUGO_VERSION`と同じバージョンをインストールするようにしてください
9+
Hugo(Extended version)を使用してWebサイトをローカルで実行することも、コンテナランタイムで実行することもできます。コンテナランタイムを使用することを強くお勧めします。これにより、本番Webサイトとのデプロイメントの一貫性が得られます
1010

11-
Hugoがインストールできたら、以下のコマンドを使ってWebサイトをローカル上で動かすことができます:
11+
## 前提条件
1212

13-
```bash
13+
このリポジトリを使用するには、以下をローカルにインストールする必要があります。
14+
15+
- [npm](https://www.npmjs.com/)
16+
- [Go](https://golang.org/)
17+
- [Hugo(Extended version)](https://gohugo.io/)
18+
- [Docker](https://www.docker.com/)などのコンテナランタイム
19+
20+
開始する前に、依存関係をインストールしてください。リポジトリのクローンを作成し、ディレクトリに移動します。
21+
22+
```
1423
git clone https://github.com/kubernetes/website.git
1524
cd website
25+
```
26+
27+
KubernetesのWebサイトではDocsyというHugoテーマを使用しています。コンテナでWebサイトを実行する場合でも、以下を実行して、サブモジュールおよびその他の開発依存関係をプルすることを強くお勧めします。
28+
29+
```
30+
# pull in the Docsy submodule
1631
git submodule update --init --recursive --depth 1
1732
```
1833

19-
**注意:** Kubernetesのウェブサイトでは[DocsyというHugoのテーマ](https://github.com/google/docsy#readme)を使用しています。リポジトリを更新していない場合、 `website/themes/docsy`ディレクトリは空です。 このサイトはテーマのローカルコピーなしでは構築できません。
34+
## コンテナを使ってウェブサイトを動かす
2035

21-
テーマをアップデートするには以下のコマンドを実行します:
36+
コンテナ内でサイトを構築するには、以下を実行してコンテナイメージを構築し、実行します。
2237

23-
```bash
24-
git submodule update --init --recursive --depth 1
38+
```
39+
make container-image
40+
make container-serve
2541
```
2642

27-
サイトをローカルでビルドしてテストするには以下のコマンドを実行します:
43+
お使いのブラウザにて http://localhost:1313 にアクセスしてください。リポジトリ内のソースファイルに変更を加えると、HugoがWebサイトの内容を更新してブラウザに反映します。
44+
45+
## Hugoを使ってローカル環境でWebサイトを動かす
46+
47+
[`netlify.toml`](netlify.toml#L10)ファイルに記述されている`HUGO_VERSION`と同じExtended versionのHugoをインストールするようにしてください。
48+
49+
ローカルでサイトを構築してテストするには、次のコマンドを実行します。
2850

2951
```bash
30-
hugo server --buildFuture
52+
# install dependencies
53+
npm ci
54+
make serve
3155
```
3256

3357
これで、Hugoのサーバーが1313番ポートを使って開始します。お使いのブラウザにて http://localhost:1313 にアクセスしてください。リポジトリ内のソースファイルに変更を加えると、HugoがWebサイトの内容を更新してブラウザに反映します。
3458

59+
## トラブルシューティング
60+
61+
### error: failed to transform resource: TOCSS: failed to transform "scss/main.scss" (text/x-scss): this feature is not available in your current Hugo version
62+
63+
Hugoは、技術的な理由から2種類のバイナリがリリースされています。現在のウェブサイトは**Hugo Extended**バージョンのみに基づいて運営されています。[リリースページ](https://github.com/gohugoio/hugo/releases)で名前に「extended」が含まれるアーカイブを探します。確認するには、`hugo version`を実行し、「extended」という単語を探します。
64+
65+
### macOSにてtoo many open filesというエラーが表示される
66+
67+
macOS上で`make serve`を実行した際に以下のエラーが表示される場合
68+
69+
```
70+
ERROR 2020/08/01 19:09:18 Error: listen tcp 127.0.0.1:1313: socket: too many open files
71+
make: *** [serve] Error 1
72+
```
73+
74+
OS上で同時に開けるファイルの上限を確認してください。
75+
76+
`launchctl limit maxfiles`
77+
78+
続いて、以下のコマンドを実行します(https://gist.github.com/tombigel/d503800a282fcadbee14b537735d202c より引用)。
79+
80+
```
81+
#!/bin/sh
82+
83+
# These are the original gist links, linking to my gists now.
84+
# curl -O https://gist.githubusercontent.com/a2ikm/761c2ab02b7b3935679e55af5d81786a/raw/ab644cb92f216c019a2f032bbf25e258b01d87f9/limit.maxfiles.plist
85+
# curl -O https://gist.githubusercontent.com/a2ikm/761c2ab02b7b3935679e55af5d81786a/raw/ab644cb92f216c019a2f032bbf25e258b01d87f9/limit.maxproc.plist
86+
87+
curl -O https://gist.githubusercontent.com/tombigel/d503800a282fcadbee14b537735d202c/raw/ed73cacf82906fdde59976a0c8248cce8b44f906/limit.maxfiles.plist
88+
curl -O https://gist.githubusercontent.com/tombigel/d503800a282fcadbee14b537735d202c/raw/ed73cacf82906fdde59976a0c8248cce8b44f906/limit.maxproc.plist
89+
90+
sudo mv limit.maxfiles.plist /Library/LaunchDaemons
91+
sudo mv limit.maxproc.plist /Library/LaunchDaemons
92+
93+
sudo chown root:wheel /Library/LaunchDaemons/limit.maxfiles.plist
94+
sudo chown root:wheel /Library/LaunchDaemons/limit.maxproc.plist
95+
96+
sudo launchctl load -w /Library/LaunchDaemons/limit.maxfiles.plist
97+
```
98+
99+
こちらはmacOSのCatalinaとMojaveで動作を確認しています。
100+
35101
## SIG Docsに参加する
36102

37103
[コミュニティのページ](https://github.com/kubernetes/community/tree/master/sig-docs#meetings)をご覧になることで、SIG Docs Kubernetesコミュニティとの関わり方を学ぶことができます。

README-pl.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Więcej informacji na temat współpracy przy tworzeniu dokumentacji znajdziesz
1717

1818
* [Jak rozpocząć współpracę](https://kubernetes.io/docs/contribute/start/)
1919
* [Podgląd wprowadzanych zmian w dokumentacji](http://kubernetes.io/docs/contribute/intermediate#view-your-changes-locally)
20-
* [Szablony stron](http://kubernetes.io/docs/contribute/style/page-templates/)
20+
* [Szablony stron](https://kubernetes.io/docs/contribute/style/page-content-types/)
2121
* [Styl pisania dokumentacji](http://kubernetes.io/docs/contribute/style/style-guide/)
2222
* [Lokalizacja dokumentacji Kubernetes](https://kubernetes.io/docs/contribute/localization/)
2323

README-vi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Một khi Pull Request của bạn được tạo, reviewer sẽ chịu trách n
1515

1616
* [Bắt đầu đóng góp](https://kubernetes.io/docs/contribute/start/)
1717
* [Các giai đoạn thay đổi tài liệu](http://kubernetes.io/docs/contribute/intermediate#view-your-changes-locally)
18-
* [Sử dụng các trang templates](http://kubernetes.io/docs/contribute/style/page-templates/)
18+
* [Sử dụng các trang templates](https://kubernetes.io/docs/contribute/style/page-content-types/)
1919
* [Hướng dẫn biểu mẫu tài liệu](http://kubernetes.io/docs/contribute/style/style-guide/)
2020
* [Địa phương hóa tài liệu Kubernetes](https://kubernetes.io/docs/contribute/localization/)
2121

0 commit comments

Comments
 (0)