Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

Commit 3c1aa5d

Browse files
author
ryo4004
committed
translate docs/add-404-page
1 parent 3cc22e0 commit 3c1aa5d

File tree

1 file changed

+15
-20
lines changed

1 file changed

+15
-20
lines changed

docs/docs/add-404-page.md

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,23 @@
11
---
2-
title: Adding a 404 Page
2+
title: 404ページを追加する
33
---
44

5-
To create a 404 page create a page whose path matches the regex
6-
`^\/?404\/?$` (`/404/`, `/404`, `404/` or `404`). Most often you'll want to create a React component page at
7-
`src/pages/404.js`.
5+
404 ページは、パスの正規表現が `^\/?404\/?$``/404/``/404``404/`、もしくは `404`)に一致するページです。
6+
ほとんどの場合あなたは、作りたい React コンポーネントページを `src/pages/404.js` に作成します。
87

9-
Gatsby ensures that your 404 page is built as `404.html` as many static hosting
10-
platforms default to using this as your 404 error page. If you're hosting your
11-
site another way, you'll need to set up a custom rule to serve this file for 404
12-
errors.
8+
一般的な静的ホスティングプラットフォームが 404 エラーページとして使っている `404.html` と同様に、Gatsby は 404 ページをビルドします。
9+
もしあなたが Gatsby 以外の方法でサイトをホストしている場合は、404 エラーに対してこのファイルが返されるようカスタムルールを設定する必要があるでしょう。
1310

14-
Because Gatsby creates this page for you by default, there is no need to configure
15-
it in your `gatsby-node.js` file.
11+
Gatsby は初期設定でこのページを自動的に作成するため、`gatsby-node.js` であらためて設定する必要はありません。
1612

17-
When developing using `gatsby develop`, Gatsby uses a default 404 page that
18-
overrides your custom 404 page. However, you can still preview your 404 page by
19-
clicking "Preview custom 404 page" to verify that it's working as expected. This is
20-
useful when you're developing so that you can see all the available pages.
13+
`gatsby develop` を使って開発しているときは、Gatsby はあなたの作成した 404 ページではなくデフォルト 404 ページを優先して表示します。
14+
ここで、「Preview custom 404 page」をクリックすることであなたが作成した 404 ページをプレビューでき、思ったとおりに動作しているかを確認できます。
15+
ここで、使用可能なすべてのページを確認できるため開発しているときに便利です。
2116

22-
The screenshot below shows the default 404 page that Gatsby creates.
23-
It also lists out all the pages on your website. Clicking the "Preview custom 404
24-
page" button will allow you to view the 404 page you created.
25-
![Gatsby Default 404 Page](./images/gatsby-default-404.png)
17+
次のスクリーンショットは、Gatsby が自動的に生成するデフォルト 404 ページです。
18+
また、ここにはあなたの作成したすべてのページが一覧で表示されます。
19+
「Preview custom 404 page」ボタンをクリックすると、あなたの作成した 404 ページが表示されます。
20+
![Gatsby デフォルト 404 ページ](./images/gatsby-default-404.png)
2621

27-
The screenshot below shows the custom 404 page.
28-
![Gatsby Custom 404 Page](./images/gatsby-custom-404.png)
22+
次のスクリーンショットはカスタム 404 ページです。
23+
![Gatsby カスタム 404 ページ](./images/gatsby-custom-404.png)

0 commit comments

Comments
 (0)