Mastering-markdown-jp » 履歴 » バージョン 4
sylow castle, 2019/04/23 23:23
| 1 | 1 | sylow castle | # Mastering-markdown-jp |
|---|---|---|---|
| 2 | |||
| 3 | ## 訳にあたって |
||
| 4 | |||
| 5 | 翻訳元:https://guides.github.com/features/mastering-markdown/ |
||
| 6 | 結構端折ってます。 |
||
| 7 | |||
| 8 | Markdown は軽くて簡単に使える言語です。GitHubプラットフォームで文章を記述するために使用できます。 |
||
| 9 | |||
| 10 | **何が身につくか** |
||
| 11 | |||
| 12 | - どのようにMarkdownを利用するか |
||
| 13 | - Markdownはこれまでのものとどう違うか。 |
||
| 14 | - GitHubのMarkdown自動レンダリングの活用 |
||
| 15 | - GitHubの独自拡張をどう利用するか |
||
| 16 | |||
| 17 | ## Markdownってなに? |
||
| 18 | |||
| 19 | MarkdownはWebで文章を書くための方法です。ドキュメントの表示を取り扱います。 |
||
| 20 | つまり、太字や斜体、画像の追加、リストの作成を簡単に行えます。 |
||
| 21 | \#や\*を除き、Markdownはほとんど文章そのままです。 |
||
| 22 | |||
| 23 | GitHubの多くの場所でMarkdownを使うことができます。 |
||
| 24 | |||
| 25 | * Gists |
||
| 26 | * イシュー、プルリクエストのコメント |
||
| 27 | * .md、.markdown形式のファイル |
||
| 28 | |||
| 29 | もっと知りたい場合は、GitHubヘルプ内の「GitHubで書く」をご覧ください。 |
||
| 30 | |||
| 31 | ## 例 |
||
| 32 | |||
| 33 | ### テキスト |
||
| 34 | |||
| 35 | > ``` |
||
| 36 | > It's very easy to make some words **bold** and other words *italic* with Markdown. You can even [link to Google!](http://google.com) |
||
| 37 | > ``` |
||
| 38 | > |
||
| 39 | > It's very easy to make some words **bold** and other words *italic* with Markdown. You can even [link to Google!](http://google.com) |
||
| 40 | > |
||
| 41 | > ### リスト |
||
| 42 | > |
||
| 43 | > ``` |
||
| 44 | > Sometimes you want numbered lists: |
||
| 45 | > |
||
| 46 | > 1. One |
||
| 47 | > 2. Two |
||
| 48 | > 3. Three |
||
| 49 | > |
||
| 50 | > Sometimes you want bullet points: |
||
| 51 | > |
||
| 52 | > * Start a line with a star |
||
| 53 | > * Profit! |
||
| 54 | > |
||
| 55 | > Alternatively, |
||
| 56 | > |
||
| 57 | > - Dashes work just as well |
||
| 58 | > - And if you have sub points, put two spaces before the dash or star: |
||
| 59 | > - Like this |
||
| 60 | > - And this |
||
| 61 | > ``` |
||
| 62 | > |
||
| 63 | > Sometimes you want numbered lists: |
||
| 64 | > |
||
| 65 | > 1. One |
||
| 66 | > 2. Two |
||
| 67 | > 3. Three |
||
| 68 | > |
||
| 69 | > Sometimes you want bullet points: |
||
| 70 | > |
||
| 71 | > * Start a line with a star |
||
| 72 | > * Profit! |
||
| 73 | > |
||
| 74 | > Alternatively, |
||
| 75 | > |
||
| 76 | > - Dashes work just as well |
||
| 77 | > - And if you have sub points, put two spaces before the dash or star: |
||
| 78 | > - Like this |
||
| 79 | > - And this |
||
| 80 | |||
| 81 | ### 画像 |
||
| 82 | |||
| 83 | > ``` |
||
| 84 | > If you want to embed images, this is how you do it: |
||
| 85 | > |
||
| 86 | >  |
||
| 87 | > ``` |
||
| 88 | > |
||
| 89 | > If you want to embed images, this is how you do it: |
||
| 90 | > |
||
| 91 | >  |
||
| 92 | > |
||
| 93 | ### 見出しと引用 |
||
| 94 | |||
| 95 | > ``` |
||
| 96 | > # Structured documents |
||
| 97 | > |
||
| 98 | > Sometimes it's useful to have different levels of headings to structure your documents. Start lines with a `#` to create headings. Multiple `##` in a row denote smaller heading sizes. |
||
| 99 | > |
||
| 100 | > ### This is a third-tier heading |
||
| 101 | > |
||
| 102 | > You can use one `#` all the way up to `######` six for different heading sizes. |
||
| 103 | > |
||
| 104 | > If you'd like to quote someone, use the > character before the line: |
||
| 105 | > |
||
| 106 | > > Coffee. The finest organic suspension ever devised... I beat the Borg with it. |
||
| 107 | > > - Captain Janeway |
||
| 108 | > ``` |
||
| 109 | > |
||
| 110 | > # Structured documents |
||
| 111 | > |
||
| 112 | > Sometimes it's useful to have different levels of headings to structure your documents. Start lines with a `#` to create headings. Multiple `##` in a row denote smaller heading sizes. |
||
| 113 | > |
||
| 114 | > ### This is a third-tier heading |
||
| 115 | > |
||
| 116 | > You can use one `#` all the way up to `######` six for different heading sizes. |
||
| 117 | > |
||
| 118 | > If you'd like to quote someone, use the > character before the line: |
||
| 119 | > |
||
| 120 | > > Coffee. The finest organic suspension ever devised... I beat the Borg with it. |
||
| 121 | > > - Captain Janeway |
||
| 122 | |||
| 123 | |||
| 124 | ### コード |
||
| 125 | |||
| 126 | preタグが邪魔なのでうまく書けぬ… |
||
| 127 | |||
| 128 | ### 追加機能 |
||
| 129 | |||
| 130 | > ``` |
||
| 131 | > GitHub supports many extras in Markdown that help you reference and link to people. If you ever want to direct a comment at someone, you can prefix their name with an @ symbol: Hey @kneath — love your sweater! |
||
| 132 | > |
||
| 133 | > But I have to admit, tasks lists are my favorite: |
||
| 134 | > |
||
| 135 | > - [x] This is a complete item |
||
| 136 | > - [ ] This is an incomplete item |
||
| 137 | > |
||
| 138 | > When you include a task list in the first comment of an Issue, you will see a helpful progress bar in your list of issues. It works in Pull Requests, too! |
||
| 139 | > |
||
| 140 | > And, of course emoji! |
||
| 141 | > ``` |
||
| 142 | > |
||
| 143 | > > GitHub supports many extras in Markdown that help you reference and link to people. If you ever want to direct a comment at someone, you can prefix their name with an @ symbol: Hey @kneath — love your sweater! |
||
| 144 | > |
||
| 145 | > But I have to admit, tasks lists are my favorite: |
||
| 146 | > |
||
| 147 | > - [x] This is a complete item |
||
| 148 | > - [ ] This is an incomplete item |
||
| 149 | > |
||
| 150 | > When you include a task list in the first comment of an Issue, you will see a helpful progress bar in your list of issues. It works in Pull Requests, too! |
||
| 151 | > |
||
| 152 | > And, of course emoji! |
||
| 153 | |||
| 154 | ## 文法ガイド |
||
| 155 | |||
| 156 | この章では、Markdown文法についての概要です。これらはGitHub.comやテキストファイルで使用できます。 |
||
| 157 | |||
| 158 | ### 見出し(Headers) |
||
| 159 | |||
| 160 | ``` |
||
| 161 | # これは<h1>タグになります |
||
| 162 | ## これは<h2>タグになります |
||
| 163 | ####### これは<h6>タグです |
||
| 164 | ``` |
||
| 165 | |||
| 166 | ### 強調(Emphasis) |
||
| 167 | |||
| 168 | ``` |
||
| 169 | *このテキストは斜体になります* |
||
| 170 | _このテキストも斜体になります_ |
||
| 171 | |||
| 172 | **これは太字になります** |
||
| 173 | __これも太字になります__ |
||
| 174 | |||
| 175 | |||
| 176 | _これらを **あわせて** 使うこともできます_ |
||
| 177 | ``` |
||
| 178 | |||
| 179 | |||
| 180 | ### リスト(Lists) |
||
| 181 | |||
| 182 | #### 順序なし |
||
| 183 | |||
| 184 | ``` |
||
| 185 | * 項目 1 |
||
| 186 | * 項目 2 |
||
| 187 | * 項目 2a |
||
| 188 | * 項目 2b |
||
| 189 | ``` |
||
| 190 | |||
| 191 | ### 順序あり |
||
| 192 | |||
| 193 | ``` |
||
| 194 | 1. 項目 1 |
||
| 195 | 1. 項目2 |
||
| 196 | 1. 項目 3 |
||
| 197 | 1. 項目 3a |
||
| 198 | 1. 項目 3b |
||
| 199 | ``` |
||
| 200 | |||
| 201 | ### 画像(Images) |
||
| 202 | |||
| 203 | ``` |
||
| 204 |  |
||
| 205 | 形式:  |
||
| 209 | |||
| 210 | ``` |
||
| 211 | http://github.com - 自動でリンクされます! |
||
| 212 | [GitHub](http://github.com) |
||
| 213 | ``` |
||
| 214 | |||
| 215 | ### 引用(Blockquotes) |
||
| 216 | |||
| 217 | ``` |
||
| 218 | カニエ・ウェストは言った: |
||
| 219 | |||
| 220 | > 我々は未来を生きている。 |
||
| 221 | > 今とは過去なのだ。 |
||
| 222 | ``` |
||
| 223 | 2 | sylow castle | |
| 224 | ### インラインコード(Inline code) |
||
| 225 | |||
| 226 | ``` |
||
| 227 | 代わりにここは |
||
| 228 | `<addr>`要素を使うべきだと考えている |
||
| 229 | ``` |
||
| 230 | |||
| 231 | ## GitHub式Markdown(GitHub Flavored Markdown) |
||
| 232 | |||
| 233 | GitHub.comはいくつか便利な機能を追加したバージョンのMwarkdownを使用しています。 |
||
| 234 | これらはGitHubでの活動をより簡単にします。 |
||
| 235 | |||
| 236 | GitHub式Markdownの機能のいくつかは概要(descriptions)とイシューやプルリクエストでのコメント(comments of Issues and Pull Requests)だけで使うことができます。これらは |
||
| 237 | これらはSHA1ハッシュ、イシュー、プルリクエストへの参照、@mentionsを含みます。 |
||
| 238 | タスクリストはGistコメント、Gist Markdownファイルでも使用可能です。 |
||
| 239 | TODO なんかここ訳がイマイチ |
||
| 240 | |||
| 241 | ### シンタックスハイライト |
||
| 242 | |||
| 243 | ### タスクリスト |
||
| 244 | |||
| 245 | ### 表 |
||
| 246 | |||
| 247 | 最初の行とそれ以外の行を-(ハイフン)で区切ります。これは最初の行のためにです。 |
||
| 248 | 各列は|(パイプ)で区切ります |
||
| 249 | |||
| 250 | ``` |
||
| 251 | First Header | Second Header |
||
| 252 | ------------ | ------------- |
||
| 253 | Content from cell 1 | Content from cell 2 |
||
| 254 | Content in the first column | Content in the second column |
||
| 255 | ``` |
||
| 256 | |||
| 257 | これは以下のようになります。 |
||
| 258 | |||
| 259 | First Header | Second Header |
||
| 260 | ------------ | ------------- |
||
| 261 | Content from cell 1 | Content from cell 2 |
||
| 262 | Content in the first column | Content in the second column |
||
| 263 | |||
| 264 | ### SHA参照 |
||
| 265 | |||
| 266 | コミットハッシュへの参照は自動的にGitHub上のコミットへのリンクとなります。 |
||
| 267 | |||
| 268 | ``` |
||
| 269 | 16c999e8c71134401a78d4d46435517b2271d6ac |
||
| 270 | mojombo@16c999e8c71134401a78d4d46435517b2271d6ac |
||
| 271 | mojombo/github-flavored-markdown@16c999e8c71134401a78d4d46435517b2271d6ac |
||
| 272 | ``` |
||
| 273 | |||
| 274 | ### リポジトリのイシュー参照 |
||
| 275 | |||
| 276 | イシューやプルリクエストを参照する数字は自動でリンクになります |
||
| 277 | |||
| 278 | ``` |
||
| 279 | #1 |
||
| 280 | mojombo#1 |
||
| 281 | mojombo/github-flavored-markdown#1 |
||
| 282 | ``` |
||
| 283 | |||
| 284 | ### ユーザー名の@メンション |
||
| 285 | |||
| 286 | @に続けてユーザー名を入力すること、その人へコミットを見るように通知を送れます。これを"@メンション"と呼ばれます。 |
||
| 287 | 何故ならこれは個別に述べる(mentioning)ことだからです。@メンションは組織のチームにも行えます。 |
||
| 288 | |||
| 289 | ### URLの自動リンク |
||
| 290 | |||
| 291 | URL(http://www.github.com/のような)は自動でリンクになります。 |
||
| 292 | |||
| 293 | ### 取り消し線 |
||
| 294 | |||
| 295 | 3 | sylow castle | 二つのチルダで囲む(`~~このように~~`)ことで取り消し線になります。 |
| 296 | 2 | sylow castle | |
| 297 | ### 絵文字 |
||
| 298 | |||
| 299 | GitHubは絵文字をサポートします。 |
||
| 300 | |||
| 301 | サポートしてる絵文字の画像はEmoji Cheat Sheetを見てください。 |