-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
i18n(ja): Update /guides/deploy/netlify.mdx
#5543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
a2d8629
03eafb9
e4a7d29
0547b75
564cd5d
43f0aff
bd67806
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -10,26 +10,28 @@ i18nReady: true | |||||
|
|
||||||
| ## プロジェクトの設定 | ||||||
|
|
||||||
| Astroプロジェクトは、静的サイト、サーバーレンダリングサイト、(実験的な)エッジレンダリングサイトの3つの異なる方法でNetlifyにデプロイできます。 | ||||||
| Astroプロジェクトは、静的サイト、サーバーレンダリングサイト、エッジレンダリングサイトの3つの異なる方法でNetlifyにデプロイできます。 | ||||||
|
|
||||||
| ### 静的サイト | ||||||
|
|
||||||
| Astroプロジェクトは、デフォルトでは静的サイトです。Netlifyに静的Astroサイトをデプロイするために、特に追加の設定は必要ありません。 | ||||||
|
|
||||||
| ### SSR/Edge用のアダプターを追加する | ||||||
| ### SSR用のアダプターを追加する | ||||||
|
|
||||||
| AstroプロジェクトでSSRを有効にし、Netlifyにデプロイするには、以下の`astro add`コマンドで[Netlifyアダプター](/ja/guides/integrations-guide/netlify/)を追加します。これにより、アダプターがインストールされ、`astro.config.mjs`ファイルが1つのステップで適切に変更されます。 | ||||||
| AstroプロジェクトでSSRを有効にし、NetlifyのEdge Functionsを使用してNetlifyにデプロイするには: | ||||||
|
|
||||||
| 以下の`astro add`コマンドで[Netlifyアダプター](/ja/guides/integrations-guide/netlify/)を追加し、AstroプロジェクトでSSRを有効にします。これによりアダプタがインストールされ、`astro.config.mjs`ファイルに適切な変更が1ステップで行われます。 | ||||||
|
|
||||||
| ```bash | ||||||
| npx astro add netlify | ||||||
| ``` | ||||||
|
|
||||||
| アダプターを手動でインストールする場合は、以下の2つのステップを実行してください。 | ||||||
|
|
||||||
| 1. [`@astrojs/netlify`アダプター](https://github.com/withastro/astro/tree/main/packages/integrations/netlify)を、パッケージマネージャーを使ってプロジェクトの依存関係にインストールします。npmをパッケージマネージャーとして使用しているかどうかわからない場合は、ターミナルで以下のコマンドを実行します。 | ||||||
| 1. [`@astrojs/netlify`アダプター](/ja/guides/integrations-guide/netlify/)を、パッケージマネージャーを使ってプロジェクトの依存関係にインストールします。npmをパッケージマネージャーとして使用しているかどうかわからない場合は、ターミナルで以下のコマンドを実行します。 | ||||||
|
|
||||||
| ```bash | ||||||
| npm install @astrojs/netlify | ||||||
| npm install @astrojs/netlify | ||||||
| ``` | ||||||
|
|
||||||
| 1. `astro.config.mjs`プロジェクト設定ファイルに新しく以下の2行を追加します。 | ||||||
|
|
@@ -44,15 +46,18 @@ npx astro add netlify | |||||
| }); | ||||||
| ``` | ||||||
|
|
||||||
| [Netlifyの実験的Edge Functions](https://docs.netlify.com/netlify-labs/experimental-features/edge-functions/#app)を使ってプロジェクトをレンダリングするには、Astro設定ファイルの`netlify/functions`インポートを`netlify/edge-functions`に変更します。 | ||||||
| ```js title="astro.config.mjs" ins={3} del={2} | ||||||
| Netlifyアダプタの設定に`edgeMiddleware: true`を追加することで、NetlifyのEdge Functionsを使用してプロジェクトをデプロイすることもできます。 | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 上記同様表記揺れだと思うので修正お願いします
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ありがとうございます。こちらも修正しました。 564cd5d |
||||||
|
|
||||||
| ```diff lang="js" | ||||||
| // astro.config.mjs | ||||||
| import { defineConfig } from 'astro/config'; | ||||||
| import netlify from '@astrojs/netlify/functions'; | ||||||
| import netlify from '@astrojs/netlify/edge-functions'; | ||||||
|
|
||||||
| export default defineConfig({ | ||||||
| output: 'server', | ||||||
| adapter: netlify(), | ||||||
| adapter: netlify({ | ||||||
| + edgeMiddleware: true | ||||||
| }), | ||||||
| }); | ||||||
| ``` | ||||||
|
|
||||||
|
|
@@ -133,4 +138,4 @@ Netlify FunctionsとAstroを併用して使う場合、特別な設定は必要 | |||||
|
|
||||||
| - [Astroサイトのデプロイ方法](https://www.netlify.com/blog/how-to-deploy-astro/) — Netlifyブログ | ||||||
| - [フォーム、サーバーレスファンクション、リダイレクトを利用したAstroサイトのデプロイ](https://www.netlify.com/blog/deploy-an-astro-site-with-forms-serverless-functions-and-redirects/) — Netlifyブログ | ||||||
| - [開発の実演動画](https://youtu.be/GrSLYq6ZTes) — Netlify YouTubeチャンネル | ||||||
| - [開発の実演動画](https://youtu.be/GrSLYq6ZTes) — Netlify YouTubeチャンネル | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -268,7 +268,7 @@ Astroコンポーネント内のスタイルをスコープするための戦略 | |
| **データ型:** `AstroIntegration` | ||
| </p> | ||
|
|
||
| ビルドアダプターにより、好みのサーバー、サーバーレス、エッジのホストにデプロイできます。[Netlify](/ja/guides/deploy/netlify/#ssredge用のアダプターを追加する)や[Vercel](/ja/guides/deploy/vercel/#ssrアダプター)などのファーストパーティーのアダプターをインポートし、AstroのSSRを活用しましょう。 | ||
| ビルドアダプターにより、好みのサーバー、サーバーレス、エッジのホストにデプロイできます。[Netlify](/ja/guides/deploy/netlify/#ssr用のアダプターを追加する)や[Vercel](/ja/guides/deploy/vercel/#ssrアダプター)などのファーストパーティーのアダプターをインポートし、AstroのSSRを活用しましょう。 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. こちらの変更ですが、このまま更新してしまうと 上記、私もやったことが無く申し訳ないのですが、下記に翻訳の履歴を更新しないやり方として書かれていますので参考までにご確認ください
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ありがとうございます。失礼しました 🙇 こちらrevertし ( 0547b75 )、URLの修正を別PRとして作りました。 |
||
|
|
||
| SSRについて詳しくは[サーバーサイドレンダリングのガイド](/ja/guides/server-side-rendering/)を、ホストの完全な一覧は[デプロイのガイド](/ja/guides/deploy/)を確認してください。 | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
表記揺れだと思うので修正お願いします
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ありがとうございます。こちらで修正しました。 564cd5d