|
1 | 1 | ---
|
2 | 2 | title: 新しいコンテンツの貢献
|
| 3 | +content_type: concept |
| 4 | +main_menu: true |
3 | 5 | weight: 20
|
4 | 6 | ---
|
| 7 | + |
| 8 | +<!-- overview --> |
| 9 | + |
| 10 | +このセクションでは、新しいコンテンツの貢献を行う前に知っておくべき情報を説明します。 |
| 11 | +<!-- See https://github.com/kubernetes/website/issues/28808 for live-editor URL to this figure --> |
| 12 | +<!-- You can also cut/paste the mermaid code into the live editor at https://mermaid-js.github.io/mermaid-live-editor to play around with it --> |
| 13 | +{{< mermaid >}} |
| 14 | +flowchart LR |
| 15 | + subgraph second[始める前に] |
| 16 | + direction TB |
| 17 | + S[ ] -.- |
| 18 | + A[CNCF CLAに署名] --> B[Gitブランチを選択] |
| 19 | + B --> C[言語ごとにPR] |
| 20 | + C --> F[コントリビューターのための<br>ツールをチェックアウト] |
| 21 | + end |
| 22 | + subgraph first[貢献の基本] |
| 23 | + direction TB |
| 24 | + T[ ] -.- |
| 25 | + D[ドキュメントをMarkdownで書き<br>Hugoでサイトをビルド] --- E[GitHubにあるソース] |
| 26 | + E --- G[複数の言語のドキュメントを含む<br>'/content/../docs'フォルダー] |
| 27 | + G --- H[Hugoのpage content<br>typesやshortcodeをレビュー] |
| 28 | + end |
| 29 | + |
| 30 | + |
| 31 | + first ----> second |
| 32 | + |
| 33 | + |
| 34 | +classDef grey fill:#dddddd,stroke:#ffffff,stroke-width:px,color:#000000, font-size:15px; |
| 35 | +classDef white fill:#ffffff,stroke:#000,stroke-width:px,color:#000,font-weight:bold |
| 36 | +classDef spacewhite fill:#ffffff,stroke:#fff,stroke-width:0px,color:#000 |
| 37 | +class A,B,C,D,E,F,G,H grey |
| 38 | +class S,T spacewhite |
| 39 | +class first,second white |
| 40 | +{{</ mermaid >}} |
| 41 | + |
| 42 | +***図 - 新しいコンテンツ提供の貢献方法*** |
| 43 | + |
| 44 | +上記の図は新しいコンテンツを申請する前に知っておくべき情報を示しています。 |
| 45 | +詳細については以下で説明します。 |
| 46 | + |
| 47 | +<!-- body --> |
| 48 | + |
| 49 | +## 貢献の基本 |
| 50 | + |
| 51 | +- KubernetesのドキュメントはMarkdownで書き、Kubernetesのウェブサイトは[Hugo](https://gohugo.io/)を使ってビルドします。 |
| 52 | +- Kubernetesのドキュメントは、Markdownのスタイルとして[CommonMark](https://commonmark.org)を使用しています。 |
| 53 | +- ソースは[GitHub](https://github.com/kubernetes/website)にあります。Kubernetesのドキュメントは`/content/en/docs/`にあります。リファレンスドキュメントの一部は、`update-imported-docs/`ディレクトリ内のスクリプトから自動的に生成されます。 |
| 54 | +- [Page content types](/docs/contribute/style/page-content-types/)にHugoによるドキュメントのコンテンツの見え方を記述しています。 |
| 55 | +- Kubernetesのドキュメントに貢献するのに[Docsy shortcode](https://www.docsy.dev/docs/adding-content/shortcodes/)や[カスタムのHugo shortcode](/docs/contribute/style/hugo-shortcodes/)が使えます。 |
| 56 | +- 標準のHugoのshortcodeに加えて、多数の[カスタムのHugo shortcode](/docs/contribute/style/hugo-shortcodes/)を使用してコンテンツの見え方をコントロールしています。 |
| 57 | +- ドキュメントのソースは`/content/`内にある複数の言語で利用できます。各言語はそれぞれ[ISO 639-1標準](https://www.loc.gov/standards/iso639-2/php/code_list.php)で定義された2文字のコードの名前のフォルダを持ちます。たとえば、英語のドキュメントのソースは`/content/en/docs/`内に置かれています。 |
| 58 | +- 複数言語でのドキュメントへの貢献や新しい翻訳の開始に関する情報については、[Kubernetesのドキュメントを翻訳する](/docs/contribute/localization)を参照してください。 |
| 59 | + |
| 60 | +## 始める前に {#before-you-begin} |
| 61 | + |
| 62 | +### CNCF CLAに署名する {#sign-the-cla} |
| 63 | + |
| 64 | +すべてのKubernetesのコントリビューターは、[コントリビューターガイド](https://github.com/kubernetes/community/blob/master/contributors/guide/README.md)を読み、[Contributor License Agreement(コントリビューターライセンス契約、CLA)への署名](https://github.com/kubernetes/community/blob/master/CLA.md)を**必ず行わなければなりません**。 |
| 65 | + |
| 66 | +CLAへの署名が完了していないコントリビューターからのpull requestは、自動化されたテストで失敗します。名前とメールアドレスは`git config`コマンドで表示されるものに一致し、gitの名前とメールアドレスはCNCF CLAで使われたものに一致しなければなりません。 |
| 67 | + |
| 68 | +### どのGitブランチを使用するかを選ぶ |
| 69 | + |
| 70 | +pull requestをオープンするときは、どのブランチをベースにして作業するかをあらかじめ知っておく必要があります。 |
| 71 | + |
| 72 | +シナリオ | ブランチ |
| 73 | +:---------|:------------ |
| 74 | +現在のリリースに対する既存または新しい英語のコンテンツ | `main` |
| 75 | +機能変更のリリースに対するコンテンツ | 機能変更が含まれるメジャーおよびマイナーバージョンに対応する、`dev-<version>`というパターンのブランチを使います。たとえば、機能変更が`v{{< skew nextMinorVersion >}}`に含まれる場合、ドキュメントの変更は``dev-{{< skew nextMinorVersion >}}``ブランチに追加します。 |
| 76 | +他の言語内のコンテンツ(翻訳) | 各翻訳対象の言語のルールに従います。詳しい情報は、[翻訳のブランチ戦略](/docs/contribute/localization/#branching-strategy)を読んでください。 |
| 77 | + |
| 78 | +それでも選ぶべきブランチがわからないときは、Slack上の`#sig-docs`チャンネルで質問してください。 |
| 79 | + |
| 80 | +{{< note >}} |
| 81 | +すでにpull requestを作成していて、ベースブランチが間違っていたことに気づいた場合は、作成者であるあなただけがベースブランチを変更できます。 |
| 82 | +{{< /note >}} |
| 83 | + |
| 84 | +### 言語ごとのPR |
| 85 | + |
| 86 | +pull requestはPRごとに1つの言語に限定してください。複数の言語に同一の変更を行う必要がある場合は、言語ごとに別々のPRを作成してください。 |
| 87 | + |
| 88 | +## コントリビューターのためのツール |
| 89 | + |
| 90 | +`kubernetes/website`リポジトリ内の[doc contributors tools](https://github.com/kubernetes/website/tree/master/content/en/docs/doc-contributor-tools)ディレクトリには、コントリビューターとしての旅を楽にしてくれるツールがあります。 |
0 commit comments