Skip to content

Commit 88dd8a3

Browse files
authored
Merge branch 'master' into update-deployment
2 parents c5084b8 + 0c9bb41 commit 88dd8a3

File tree

101 files changed

+8039
-5351
lines changed

Some content is hidden

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

101 files changed

+8039
-5351
lines changed

.all-contributorsrc

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,60 @@
362362
"contributions": [
363363
"bug"
364364
]
365+
},
366+
{
367+
"login": "himorishige",
368+
"name": "Hiroshi MORISHIGE",
369+
"avatar_url": "https://avatars.githubusercontent.com/u/71954454?v=4",
370+
"profile": "https://github.com/himorishige",
371+
"contributions": [
372+
"translation"
373+
]
374+
},
375+
{
376+
"login": "progriro",
377+
"name": "shinya fukimbara",
378+
"avatar_url": "https://avatars.githubusercontent.com/u/51112816?v=4",
379+
"profile": "https://github.com/progriro",
380+
"contributions": [
381+
"translation"
382+
]
383+
},
384+
{
385+
"login": "yodakaEngineer",
386+
"name": "yodaka",
387+
"avatar_url": "https://avatars.githubusercontent.com/u/44350989?v=4",
388+
"profile": "https://www.yodaka-star.com/profile",
389+
"contributions": [
390+
"translation"
391+
]
392+
},
393+
{
394+
"login": "Kazuhiro-Mimaki",
395+
"name": "Kazuhiro-Mimaki",
396+
"avatar_url": "https://avatars.githubusercontent.com/u/62820515?v=4",
397+
"profile": "https://github.com/Kazuhiro-Mimaki",
398+
"contributions": [
399+
"translation"
400+
]
401+
},
402+
{
403+
"login": "Piyopanman",
404+
"name": "Piyopanman",
405+
"avatar_url": "https://avatars.githubusercontent.com/u/66374097?v=4",
406+
"profile": "http://piyopanman.com",
407+
"contributions": [
408+
"translation"
409+
]
410+
},
411+
{
412+
"login": "TetsuyaNegishi",
413+
"name": "Tetsuya Negishi",
414+
"avatar_url": "https://avatars.githubusercontent.com/u/8405585?v=4",
415+
"profile": "https://github.com/TetsuyaNegishi",
416+
"contributions": [
417+
"translation"
418+
]
365419
}
366420
],
367421
"contributorsPerLine": 7,

.textlintrc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"no-doubled-joshi": {
99
"strict": false,
1010
"allow": ["か"], // 助詞のうち「か」は複数回の出現を許す(e.g.: するかどうか)
11-
}
11+
},
12+
"no-exclamation-question-mark": false
1213
},
1314
"preset-ja-spacing": {
1415
"ja-space-between-half-and-full-width": {
@@ -23,6 +24,9 @@
2324
"ja-technical-writing/ja-no-mixed-period": {
2425
"allowPeriodMarks": [":"],
2526
},
27+
"ja-technical-writing/max-comma": {
28+
"max": 5
29+
},
2630
"ja-technical-writing/sentence-length": false, //100文字数制限の無効化
2731
"prh": {
2832
"rulePaths" :[

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<!-- textlint-enable -->
44

55
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
6-
[![All Contributors](https://img.shields.io/badge/all_contributors-38-orange.svg?style=flat-square)](#contributors)
6+
[![All Contributors](https://img.shields.io/badge/all_contributors-44-orange.svg?style=flat-square)](#contributors)
77
<!-- ALL-CONTRIBUTORS-BADGE:END -->
88

99
![reviewdog](https://github.com/Nextjs-ja-translation/Nextjs-ja-translation-docs/workflows/reviewdog/badge.svg)
@@ -139,6 +139,14 @@ Thanks to these wonderful people ([emoji key](https://allcontributors.org/docs/e
139139
<td align="center"><a href="https://kirohi.now.sh"><img src="https://avatars1.githubusercontent.com/u/38400669?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Hiroki.Ihoriya</b></sub></a><br /><a href="#translation-ia17011" title="Translation">🌍</a></td>
140140
<td align="center"><a href="https://fiveteesixone.lackland.io"><img src="https://avatars.githubusercontent.com/u/333180?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Hirofumi Wakasugi</b></sub></a><br /><a href="https://github.com/Nextjs-ja-translation/Nextjs-ja-translation-docs/pulls?q=is%3Apr+reviewed-by%3A5t111111" title="Reviewed Pull Requests">👀</a></td>
141141
<td align="center"><a href="https://numb86.net/"><img src="https://avatars.githubusercontent.com/u/16703337?v=4?s=100" width="100px;" alt=""/><br /><sub><b>numb86</b></sub></a><br /><a href="https://github.com/Nextjs-ja-translation/Nextjs-ja-translation-docs/issues?q=author%3Anumb86" title="Bug reports">🐛</a></td>
142+
<td align="center"><a href="https://github.com/himorishige"><img src="https://avatars.githubusercontent.com/u/71954454?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Hiroshi MORISHIGE</b></sub></a><br /><a href="#translation-himorishige" title="Translation">🌍</a></td>
143+
<td align="center"><a href="https://github.com/progriro"><img src="https://avatars.githubusercontent.com/u/51112816?v=4?s=100" width="100px;" alt=""/><br /><sub><b>shinya fukimbara</b></sub></a><br /><a href="#translation-progriro" title="Translation">🌍</a></td>
144+
<td align="center"><a href="https://www.yodaka-star.com/profile"><img src="https://avatars.githubusercontent.com/u/44350989?v=4?s=100" width="100px;" alt=""/><br /><sub><b>yodaka</b></sub></a><br /><a href="#translation-yodakaEngineer" title="Translation">🌍</a></td>
145+
<td align="center"><a href="https://github.com/Kazuhiro-Mimaki"><img src="https://avatars.githubusercontent.com/u/62820515?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kazuhiro-Mimaki</b></sub></a><br /><a href="#translation-Kazuhiro-Mimaki" title="Translation">🌍</a></td>
146+
</tr>
147+
<tr>
148+
<td align="center"><a href="http://piyopanman.com"><img src="https://avatars.githubusercontent.com/u/66374097?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Piyopanman</b></sub></a><br /><a href="#translation-Piyopanman" title="Translation">🌍</a></td>
149+
<td align="center"><a href="https://github.com/TetsuyaNegishi"><img src="https://avatars.githubusercontent.com/u/8405585?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tetsuya Negishi</b></sub></a><br /><a href="#translation-TetsuyaNegishi" title="Translation">🌍</a></td>
142150
</tr>
143151
</table>
144152

components/container.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ export default function Container({
1616
...props
1717
}) {
1818
return (
19-
<div {...props}>
19+
<div {...props} className="container">
2020
<style jsx>
2121
{`
22-
{
22+
.container {
2323
width: 100%;
2424
margin: 0 auto;
2525
padding: ${padding ? '6.25rem' : '0'} ${wide ? '0' : '1rem'};
@@ -45,7 +45,7 @@ export default function Container({
4545
}
4646
${divider ? `border-top: 1px solid rgba(0,0,0,0.1);` : ''}
4747
}
48-
:after {
48+
.container:after {
4949
// BFC
5050
content: '';
5151
display: table;

components/footer.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,13 @@ export default withPure(() => (
7070
</Link>
7171
</p>
7272
<p>
73-
<Link href="https://github.com/Nextjs-ja-translation/Nextjs-ja-translation-docs#contributors-">
74-
<a>コントリビューター</a>
75-
</Link>
73+
<a
74+
href="https://github.com/Nextjs-ja-translation/Nextjs-ja-translation-docs#contributors-"
75+
rel="noopener noreferrer"
76+
target="_blank"
77+
>
78+
コントリビューター
79+
</a>
7680
</p>
7781
</div>
7882
<div>

components/home/campaign.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ const campaignWords = [
1515
export default () => {
1616
const animationDuration = 1.8;
1717
const animationLength = animationDuration * campaignWords.length;
18-
const endOfAnimation = 100 / campaignWords.length;
19-
const animationOverlap = 0.1;
2018

2119
return (
2220
<div className="slider-container">
@@ -66,16 +64,16 @@ export default () => {
6664
transform: translate3d(-50%, 25%, 0px);
6765
visibility: visible;
6866
}
69-
${1 - 1 * animationOverlap}% {
67+
0.9% {
7068
opacity: 1;
7169
transform: translate3d(-50%, 75%, 0px);
7270
}
73-
${endOfAnimation}% {
71+
9.09% {
7472
opacity: 1;
7573
transform: translate3d(-50%, 75%, 0px);
7674
visibility: visible;
7775
}
78-
${endOfAnimation + endOfAnimation * animationOverlap}% {
76+
17.271% {
7977
opacity: 0;
8078
transform: translate3d(-50%, 135%, 0px);
8179
visibility: hidden;

components/navbar.js

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,24 @@ function Navbar() {
4545
</div>
4646

4747
<div className="links">
48-
<Link href="/">
49-
<a className="logo">
50-
<NextLogo />
51-
</a>
52-
</Link>
53-
54-
<Link href="/docs/[...slug]" as="/docs/getting-started">
55-
<a
56-
className={cn('mute', {
57-
selected: route.startsWith('/docs')
58-
})}
59-
title="Documentation"
60-
>
61-
Docs
62-
</a>
63-
</Link>
48+
<div className="wrapper">
49+
<Link href="/">
50+
<a className="logo">
51+
<NextLogo />
52+
</a>
53+
</Link>
54+
55+
<Link href="/docs/[...slug]" as="/docs/getting-started">
56+
<a
57+
className={cn('link mute', {
58+
selected: route.startsWith('/docs')
59+
})}
60+
title="Documentation"
61+
>
62+
Docs
63+
</a>
64+
</Link>
65+
</div>
6466

6567
<a
6668
href="https://github.com/vercel/next.js"
@@ -91,6 +93,15 @@ function Navbar() {
9193
z-index: 1;
9294
}
9395
96+
.wrapper {
97+
display: flex;
98+
align-items: center;
99+
}
100+
101+
.link {
102+
margin-left: 2rem;
103+
}
104+
94105
.links a {
95106
text-decoration: none;
96107
transition: color 0.2s ease;
@@ -154,6 +165,10 @@ function Navbar() {
154165
font-size: 14px;
155166
}
156167
168+
.link {
169+
margin-left: 0;
170+
}
171+
157172
.mobile-top {
158173
width: 100%;
159174
display: flex;

docs/advanced-features/amp-support/adding-amp-components.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: AMPコミュニティのコンポーネントを追加して、よ
44

55
# AMPコンポーネントの追加
66

7-
AMPコミュニティは、よりインタラクティブなAMPページを作成するのに役立つ [たくさんのコンポーネント](https://amp.dev/documentation/components/) を提供しています。 Next.js はページで使用されるすべてのコンポーネントを自動的にインポートするので、AMPコンポーネントのスクリプトを手動でインポートする必要はありません:
7+
AMP コミュニティは、よりインタラクティブな AMP ページを作成するのに役立つ [たくさんのコンポーネント](https://amp.dev/documentation/components/) を提供しています。 Next.js はページで使用されるすべてのコンポーネントを自動的にインポートするので、AMP コンポーネントのスクリプトを手動でインポートする必要はありません:
88

99
```jsx
1010
export const config = { amp: true };
@@ -49,7 +49,12 @@ function MyAmpPage() {
4949
</Head>
5050

5151
<p>Some time: {date.toJSON()}</p>
52-
<amp-timeago width="0" height="15" datetime={date.toJSON()} layout="responsive">
52+
<amp-timeago
53+
width="0"
54+
height="15"
55+
datetime={date.toJSON()}
56+
layout="responsive"
57+
>
5358
.
5459
</amp-timeago>
5560
</div>

docs/advanced-features/amp-support/amp-in-static-html-export.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Next.js は、HTML ページに AMP ページへのリンクを自動的に挿
2727
<link rel="canonical" href="/about" />
2828
```
2929

30-
[`exportTrailingSlash`](/docs/api-reference/next.config.js/exportPathMap.md#0cf7d6666b394c5d8d08a16a933e86ea) を有効にすると、 `pages/about.js` は以下のようにエクスポートされます:
30+
[`trailingSlash`](/docs/api-reference/next.config.js/trailingSlash.md) を有効にすると、 `pages/about.js` は以下のようにエクスポートされます:
3131

3232
- `out/about/index.html` - HTML ページ
3333
- `out/about.amp/index.html` - AMP ページ

docs/advanced-features/amp-support/amp-validation.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,27 @@ description: AMPページは、開発時やビルド時にNext.jsによって自
77
AMP ページは開発時に [amphtml-validator](https://www.npmjs.com/package/amphtml-validator) によって自動的に検証されます。 エラーや注意事項は Next.js を起動したターミナルに表示されます。
88

99
ページは [静的 HTML のエクスポート](/docs/advanced-features/static-html-export.md) 時にも検証され、エラーや注意事項はターミナルに表示されます。有効ではない AMP のエクスポートによって、AMP のエラーが発生した場合は、ステータスコード `1` で処理を終了します。
10+
11+
### 検証のカスタム
12+
13+
以下のような `next.config.js` によって、AMP ページの検証をカスタマイズできます。
14+
15+
```jsx
16+
module.exports = {
17+
amp: {
18+
validator: './custom_validator.js',
19+
},
20+
}
21+
```
22+
23+
### 検証のスキップ
24+
25+
AMP ページの検証をオフにする場合は、`next.config.js` に以下のコードを追加します。
26+
27+
```jsx
28+
experimental: {
29+
amp: {
30+
skipValidation: true
31+
}
32+
}
33+
```

docs/advanced-features/automatic-static-optimization.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,30 @@ description: Next.js は可能であれば静的な HTML へとアプリケー
2121

2222
プリレンダリング中は、この段階で使用できる `query` の情報がないため、 `query` は空オブジェクトになります。ハイドレーション後は、 `query` オブジェクト内のルートパラメータをアプリケーションに与えるように、 Next.js がアプリケーションを更新します。
2323

24-
> **備考:** [動的なルーティング](/docs/routing/dynamic-routes.md)と共に [`getStaticProps`](/docs/basic-features/data-fetching.md#getstaticprops-static-generation) を用いたページに与えられたパラメータは、いつでも `query` オブジェクト内で使用可能です。
24+
ハイドレーションの後にクエリが更新され、さらにレンダリングが生じるケースは以下の通りです。
25+
26+
- ページが [dynamic-route](/docs/routing/dynamic-routes.md) である場合
27+
- ページが URL にクエリの値を持っている場合
28+
- `next.config.js`[Rewrites](/docs/api-reference/next.config.js/rewrites.md) が設定されている場合。これらは `query` として解析、提供されるべきパラメータを含み得るためです。
29+
30+
クエリが全て更新され使用可能な状態になったかどうか判断するためには、[`next/router`](/docs/api-reference/next/router.md#router-object) に存在する `isReady` フィールドを利用できます。
31+
32+
> **備考:** [動的なルーティング](/docs/routing/dynamic-routes.md)と共に [`getStaticProps`](/docs/basic-features/data-fetching/get-static-props.md) を用いたページに与えられたパラメータは、いつでも `query` オブジェクト内で使用可能です。****
2533
2634
`next build` は静的最適化がされたページに対して `.html` ファイルを出力します。例えば、 `pages/about.js` のページに対するビルド結果は以下のようになります:
2735

2836
```bash
29-
.next/server/static/${BUILD_ID}/about.html
37+
.next/server/pages/about.html
3038
```
3139

3240
`getServerSideProps` をページに加えると、今度はビルド結果が以下のような JavaScript ファイルになります:
3341

3442
```bash
35-
.next/server/static/${BUILD_ID}/about.js
43+
.next/server/pages/about.js
3644
```
3745

3846
## 注意事項
3947

40-
- `getInitialProps` を用いた[カスタム `App` ](/docs/advanced-features/custom-app.md)の場合、[静的生成](/docs/basic-features/data-fetching.md#getstaticprops-static-generation)なしのページではこの最適化はオフになります。
48+
- `getInitialProps` を用いた[カスタム `App` ](/docs/advanced-features/custom-app.md)の場合、[静的生成](/docs/basic-features/data-fetching/get-static-props.md)なしのページではこの最適化はオフになります。
4149

4250
- `getInitialProps` を用いた[カスタム `Document` ](/docs/advanced-features/custom-document.md)の場合は、ページがサーバーサイドでレンダリングされると仮定する前に `ctx.req` が定義されているかどうかを確認してください。`ctx.req` はプリレンダリングされるページでは `undefined` になります。

docs/advanced-features/codemods.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ Codemods are transformations that run on your codebase programmatically. This al
1717
- `--dry` Do a dry-run, no code will be edited
1818
- `--print` Prints the changed output for comparison
1919

20+
## Next.js 11
21+
22+
### `cra-to-next` (experimental)
23+
24+
Migrates a Create React App project to Next.js; creating a pages directory and necessary config to match behavior. Client-side only rendering is leveraged initially to prevent breaking compatibility due to `window` usage during SSR and can be enabled seamlessly to allow gradual adoption of Next.js specific features.
25+
26+
Please share any feedback related to this transform [in this discussion](https://github.com/vercel/next.js/discussions/25858).
27+
2028
## Next.js 10
2129

2230
### `add-missing-react-import`
@@ -132,7 +140,7 @@ npx @next/codemod withamp-to-config
132140

133141
### `url-to-withrouter`
134142

135-
Transforms the deprecated automatically injected `url` property on top level pages to using `withRouter` and the `router` property it injects. Read more here: [err.sh/next.js/url-deprecated](https://err.sh/next.js/url-deprecated)
143+
Transforms the deprecated automatically injected `url` property on top level pages to using `withRouter` and the `router` property it injects. Read more here: [https://nextjs.org/docs/messages/url-deprecated](https://nextjs.org/docs/messages/url-deprecated)
136144

137145
For example:
138146

@@ -161,7 +169,7 @@ export default withRouter(
161169
)
162170
```
163171

164-
This is just one case. All the cases that are transformed (and tested) can be found in the [`__testfixtures__` directory](https://github.com/vercel/next.js/tree/canary/packages/next-codemod/transforms/__testfixtures__/url-to-withrouter).
172+
This is one case. All the cases that are transformed (and tested) can be found in the [`__testfixtures__` directory](https://github.com/vercel/next.js/tree/canary/packages/next-codemod/transforms/__testfixtures__/url-to-withrouter).
165173

166174
#### Usage
167175

@@ -175,4 +183,4 @@ Run the codemod:
175183

176184
```
177185
npx @next/codemod url-to-withrouter
178-
```
186+
```

0 commit comments

Comments
 (0)