Skip to content
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

Docs - Blueprints - Resources: Highlight installPlugin and installTheme steps and most common resouces for them #1733

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions packages/docs/site/docs/blueprints/04-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ slug: /blueprints/steps/resources

Resource References allow you use external files in Blueprints

In the `installPlugin` step in the example above, we reference the `https://downloads.wordpress.org/plugins/friends.latest-stable.zip` file by using the `wordpress.org/plugins` resource reference.
:::info
Blueprints steps such as [[`installPlugin`](/blueprints/steps#InstallPluginStep)] or [`installTheme`](/blueprints/steps#InstallThemeStep) require a location of the plugin or theme to be installed.

That location can be defined as [a `URL` resource](#urlreference) of the `.zip` file containg the theme or plugin. It can also be defined as a [`wordpress.org/plugins`](#corepluginreference) or [`wordpress.org/themes`](#corethemereference) resource for thouse plugins/themes published in the official WordPress directories.
:::

The following resource references are available:

Expand Down Expand Up @@ -37,7 +41,11 @@ To use the URLReference resource, you need to provide the URL of the file. For e
The resource `url` type works really in combination with blueprint steps such as [`installPlugin`](/blueprints/steps#InstallPluginStep) or
[`installTheme`](http://localhost:3000/wordpress-playground/blueprints/steps#InstallThemeStep). These steps require a `ResourceType` to define the location of the plugin or the theme to install.

With a `"resource": "url"` we can define the location of a `.zip` containing the plugin/theme via a URL that can point direclty to a GitHub repo. To avoid CORS issues, the Playground project provides a [GitHub proxy](https://playground.wordpress.net/proxy) that also allows you to generate a `.zip` from a repository (or even a folder inside a repo) containing your plugin or theme.
With a `"resource": "url"` we can define the location of a `.zip` containing the plugin/theme via a URL that can point direclty to a GitHub repo.

:::tip
The Playground project provides a [GitHub Proxy](https://playground.wordpress.net/proxy) that allows you to generate a `.zip` from a repository (or even a folder inside a repo) containing your plugin or theme. This tool is very useful for avoiding CORS issues, among others..
:::

### CoreThemeReference

Expand Down
Loading