Skip to content

Commit

Permalink
Docs - Blueprints - Resources: Highlight installPlugin and installThe…
Browse files Browse the repository at this point in the history
…me steps and most common resouces for them (#1733)

Highlight installPlugin and installTheme steps and most common resouces
for them. Also highlight [GitHub Proxy](playground.wordpress.net/proxy)
tool.

## Motivation for the change, related issues
Because installation of plugins and themes from both official WP
directories and zips from repos are one of the most recurrent actions to
do in blueprints.
  • Loading branch information
juanmaguitar authored Sep 6, 2024
1 parent 11dbd6e commit 642173b
Showing 1 changed file with 10 additions and 2 deletions.
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

0 comments on commit 642173b

Please sign in to comment.