|
| 1 | +--- |
| 2 | +title: はじめる |
| 3 | +slug: /blueprints/getting-started |
| 4 | +--- |
| 5 | + |
| 6 | +# ブループリントを使い始める |
| 7 | + |
| 8 | +<!-- |
| 9 | +# Getting started with Blueprints |
| 10 | +--> |
| 11 | + |
| 12 | +ブループリントは、WordPress Playground インスタンスを独自にセットアップするための JSON ファイルです。例えば: |
| 13 | + |
| 14 | +<!-- |
| 15 | +Blueprints are JSON files for setting up your very own WordPress Playground instance. For example: |
| 16 | +--> |
| 17 | + |
| 18 | +```json |
| 19 | +{ |
| 20 | + "$schema": "https://playground.wordpress.net/blueprint-schema.json", |
| 21 | + "landingPage": "/wp-admin/", |
| 22 | + "preferredVersions": { |
| 23 | + "php": "8.0", |
| 24 | + "wp": "latest" |
| 25 | + }, |
| 26 | + "steps": [ |
| 27 | + { |
| 28 | + "step": "login", |
| 29 | + "username": "admin", |
| 30 | + "password": "password" |
| 31 | + } |
| 32 | + ] |
| 33 | +} |
| 34 | +``` |
| 35 | + |
| 36 | +ブループリントを使用するには 3 つの方法があります。 |
| 37 | + |
| 38 | +<!-- |
| 39 | +There are three ways to use Blueprints: |
| 40 | +--> |
| 41 | + |
| 42 | +- [WordPress Playground ウェブサイトの URL「fragment」にブループリントを貼り付けます](/blueprints/using-blueprints#url-fragment)。 |
| 43 | +- [JavaScript API で使用します](/blueprints/using-blueprints#javascript-api)。 |
| 44 | +- [QueryParam blueprint-url 経由でブループリントの JSON ファイルを参照します](/developers/apis/query-api/) |
| 45 | + |
| 46 | +<!-- |
| 47 | +- [Paste a Blueprint into the URL "fragment" on WordPress Playground website](/blueprints/using-blueprints#url-fragment). |
| 48 | +- [Use them with the JavaScript API](/blueprints/using-blueprints#javascript-api). |
| 49 | +- [Reference a blueprint JSON file via QueryParam blueprint-url](/developers/apis/query-api/) |
| 50 | +--> |
| 51 | + |
| 52 | +## ブループリントによってどのような問題が解決されますか? |
| 53 | + |
| 54 | +<!-- |
| 55 | +## What problems are solved by Blueprints? |
| 56 | +--> |
| 57 | + |
| 58 | +### コーディングスキルは不要 |
| 59 | + |
| 60 | +<!-- |
| 61 | +### No coding skills required |
| 62 | +--> |
| 63 | + |
| 64 | +ブループリントは JSON 形式で記述します。開発環境やライブラリ、JavaScript の知識も必要ありません。どんなテキストエディタでも記述できます。 |
| 65 | + |
| 66 | +<!-- |
| 67 | +Blueprints are just JSON. You don't need a development environment, any libraries, or even JavaScript knowledge. You can write them in any text editor. |
| 68 | +--> |
| 69 | + |
| 70 | +ただし、開発環境をお持ちの場合は、それは素晴らしいことです。[Blueprint JSON スキーマ](https://playground.wordpress.net/blueprint-schema.json) を使用して、自動補完と検証を利用できます。 |
| 71 | + |
| 72 | +<!-- |
| 73 | +However, if you do have a development environment, that's great! You can use the [Blueprint JSON schema](https://playground.wordpress.net/blueprint-schema.json) to get autocompletion and validation. |
| 74 | +--> |
| 75 | + |
| 76 | +### HTTP リクエストは自動的に管理されます |
| 77 | + |
| 78 | +<!-- |
| 79 | +### HTTP Requests are managed for you |
| 80 | +--> |
| 81 | + |
| 82 | +ブループリントは、宣言したリソースを自動的に取得します。複数の `fetch()` 呼び出しを管理したり、それらの完了を待ったりする必要はありません。いくつかのリンクを宣言するだけで、ブループリントがダウンロードパイプラインを処理・最適化します。 |
| 83 | + |
| 84 | +<!-- |
| 85 | +Blueprints fetch any resources you declare for you. You don't have to worry about managing multiple `fetch()` calls or waiting for them to finish. You can just declare a few links and let Blueprints handle and optimize the downloading pipeline. |
| 86 | +--> |
| 87 | + |
| 88 | +### ブループリントで事前設定されたプレイグラウンドにリンクできます |
| 89 | + |
| 90 | +<!-- |
| 91 | +### You can link to a Blueprint-preconfigured Playground |
| 92 | +--> |
| 93 | + |
| 94 | +ブループリントは URL に貼り付けることができるため、特定の設定の Playground を埋め込んだり、リンクしたりできます。例えば、このボタンをクリックすると、PHP 7.4 とペンダントテーマがインストールされた Playground が開きます。 |
| 95 | + |
| 96 | +<!-- |
| 97 | +Because Blueprints can be pasted in the URL, you can embed or link to a Playground with a specific configuration. For example, clicking this button will open a Playground with PHP 7.4 and a pendant theme installed: |
| 98 | +--> |
| 99 | + |
| 100 | +import BlueprintExample from '@site/src/components/Blueprints/BlueprintExample.mdx'; |
| 101 | + |
| 102 | +<BlueprintExample justButton={true} blueprint={{ |
| 103 | + "preferredVersions": { |
| 104 | + "php": "7.4", |
| 105 | + "wp": "latest" |
| 106 | + }, |
| 107 | + "steps": [ |
| 108 | + { |
| 109 | + "step": "installTheme", |
| 110 | + "themeData": { |
| 111 | + "resource": "wordpress.org/themes", |
| 112 | + "slug": "pendant" |
| 113 | + }, |
| 114 | + "options": { |
| 115 | + "activate": true |
| 116 | + } |
| 117 | + } |
| 118 | + ] |
| 119 | +}} /> |
| 120 | + |
| 121 | +### デフォルトで信頼される |
| 122 | + |
| 123 | +<!-- |
| 124 | +### Trusted by default |
| 125 | +--> |
| 126 | + |
| 127 | +ブループリントは単なる JSON です。他の人のブループリントを実行するのに信頼は必要ありません。ブループリントは任意の JavaScript を実行できないため、できることには制限があります。 |
| 128 | + |
| 129 | +<!-- |
| 130 | +Blueprints are just JSON. Running other people's Blueprints doesn't require the element of trust. Since Blueprints cannot execute arbitrary JavaScript, they are limited in what they can do. |
| 131 | +--> |
| 132 | + |
| 133 | +ブループリントを利用することで、WordPress.org プラグインディレクトリでプラグインのライブプレビューを提供できるようになります。プラグイン作成者は、カスタムブループリントを作成するだけで、必要なサイトオプションやスターターコンテンツなど、Playground インスタンスを事前設定できます。 |
| 134 | + |
| 135 | +<!-- |
| 136 | +With Blueprints, WordPress.org plugin directory may be able to offer live previews of plugins. Plugin authors will just write a custom Blueprint to preconfigure the Playground instance with any site options or starter content they may need. |
| 137 | +--> |
| 138 | + |
| 139 | +### 一度書けばどこでも使える |
| 140 | + |
| 141 | +<!-- |
| 142 | +### Write it once, use it anywhere |
| 143 | +--> |
| 144 | + |
| 145 | +ブループリントは Web と Node.js の両方で動作します。同じ JavaScript プロセス内で実行することも、リモートの Playground クライアント経由で実行することもできます。ブループリントは設定のための普遍的な言語です。Playground を実行できる場所であれば、ブループリントを使用できます。 |
| 146 | + |
| 147 | +<!-- |
| 148 | +Blueprints work both on the web and in node.js. You can run them both in the same JavaScript process, and through a remote Playground Client. They are the universal language of configuration. Where you can run Playground, you can use Blueprints. |
| 149 | +--> |
0 commit comments