From 45842756554492cd4f8d2d18765382537cff7dd4 Mon Sep 17 00:00:00 2001 From: Akira Yanagihara Date: Wed, 15 Jan 2020 22:47:23 +0900 Subject: [PATCH 1/3] wip --- docs/docs/using-a-plugin-in-your-site.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/docs/using-a-plugin-in-your-site.md b/docs/docs/using-a-plugin-in-your-site.md index 75f39191b..487adac9f 100644 --- a/docs/docs/using-a-plugin-in-your-site.md +++ b/docs/docs/using-a-plugin-in-your-site.md @@ -1,12 +1,12 @@ --- -title: Using a Plugin in Your Site +title: サイトでプラグインを利用する --- -Gatsby plugins are Node.js packages, so you can install them like other packages in node using NPM. +Gatsby プラグインは、Node.js パッケージです。 NPM を利用して他の node パッケージと同様にインストールできます。 -For example, `gatsby-transformer-json` is a package that adds support for JSON files to the Gatsby data layer. +例えば、`gatsby-transformer-json` は JSON ファイルのサポートを Gatsby データレイヤーに追加するパッケージです。 -To install it, in the root of your site you run: +インストールするには、サイトのルートディレクトリーで下記のコマンドを実行します。 ```shell npm install --save gatsby-transformer-json From bd63490a0bc1cd003de1889955fc5359d65da5d5 Mon Sep 17 00:00:00 2001 From: Akira Yanagihara Date: Thu, 16 Jan 2020 00:20:57 +0900 Subject: [PATCH 2/3] Translate: docs/using-a-plugin-in-your-site --- docs/docs/using-a-plugin-in-your-site.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/docs/using-a-plugin-in-your-site.md b/docs/docs/using-a-plugin-in-your-site.md index 487adac9f..2f3db2389 100644 --- a/docs/docs/using-a-plugin-in-your-site.md +++ b/docs/docs/using-a-plugin-in-your-site.md @@ -12,7 +12,7 @@ Gatsby プラグインは、Node.js パッケージです。 NPM を利用して npm install --save gatsby-transformer-json ``` -Then in your site's `gatsby-config.js` you add `gatsby-transformer-json` to the plugins array like: +次にサイトの `gatsby-config.js` にある plugins というキーの配列に `gatsby-transformer-json` を追加します。 ```javascript:title=gatsby-config.js module.exports = { @@ -20,15 +20,15 @@ module.exports = { } ``` -Plugins can take options. For example: +プラグインはオプションを取ることができます。例を記載します。 ```javascript:title=gatsby-config.js module.exports = { plugins: [ - // Shortcut for adding plugins without options. + // オプションなしでプラグインを追加するためのショートカット "gatsby-plugin-react-helmet", { - // Standard plugin with options example + // オプション付きで標準的なプラグインを追加するための例 resolve: `gatsby-source-filesystem`, options: { path: `${__dirname}/src/data/`, @@ -37,7 +37,7 @@ module.exports = { }, { resolve: "gatsby-plugin-offline", - // Blank options, equivalent to string-only plugin + // options が空の場合、文字列だけでプラグインを指定したときと同等です options: { plugins: [], }, @@ -45,7 +45,7 @@ module.exports = { { resolve: `gatsby-transformer-remark`, options: { - // plugins inside plugins + // プラグイン内のプラグイン plugins: [`gatsby-remark-smartypants`], }, }, @@ -53,4 +53,4 @@ module.exports = { } ``` -Note that plugin options will be stringified by Gatsby, so they cannot be functions. +プラグインのオプションは Gatsby によって文字列化されるため、関数にすることはできません。 From 244acdf6d5c791b1aa30ed3bc32b7e4a361316f0 Mon Sep 17 00:00:00 2001 From: Akira Yanagihara Date: Thu, 16 Jan 2020 00:51:48 +0900 Subject: [PATCH 3/3] [fixed] improve message --- docs/docs/using-a-plugin-in-your-site.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/using-a-plugin-in-your-site.md b/docs/docs/using-a-plugin-in-your-site.md index 2f3db2389..9dd470beb 100644 --- a/docs/docs/using-a-plugin-in-your-site.md +++ b/docs/docs/using-a-plugin-in-your-site.md @@ -2,7 +2,7 @@ title: サイトでプラグインを利用する --- -Gatsby プラグインは、Node.js パッケージです。 NPM を利用して他の node パッケージと同様にインストールできます。 +Gatsby プラグインは、Node.js のパッケージです。 NPM を利用して他の node パッケージと同様にインストールできます。 例えば、`gatsby-transformer-json` は JSON ファイルのサポートを Gatsby データレイヤーに追加するパッケージです。 @@ -20,7 +20,7 @@ module.exports = { } ``` -プラグインはオプションを取ることができます。例を記載します。 +プラグインは以下のようにしてオプションを受け取ることができます。 ```javascript:title=gatsby-config.js module.exports = {