Skip to content

Commit

Permalink
Merge pull request #53 from WordPress/michalczaplinski-update-readme
Browse files Browse the repository at this point in the history
Update README.md with better setup instructions.
  • Loading branch information
cbravobernal committed Jul 11, 2023
2 parents 9eff261 + 018c277 commit d3d3ffd
Showing 1 changed file with 19 additions and 20 deletions.
39 changes: 19 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,35 +33,34 @@ your projects at your own risk.

## Setup

In order to be able to test this demo, you just need to:

1. Install the required plugins:

- [Gutenberg](https://github.com/WordPress/gutenberg/releases/latest/download/gutenberg.zip)

- [Block Interactivity Experiments](https://github.com/WordPress/block-interactivity-experiments/releases/latest/download/block-interactivity-experiments.zip). This one requires Gutenberg to work.
- If you use [`wp-env`]([url](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/)), run `npx wp-env start` to install the plugins automatically and run a local WP instance.

- [Movies Demo Plugin](https://github.com/WordPress/wp-movies-demo/releases/latest/download/wp-movies-plugin.zip). This one requires the Block Interactivity Experiments to work.
- Otherwise, install the following plugins:

Note that, if you are using `wp-env` to run your site locally, these plugins will be installed by default after running `wp-env` start. Before that, don't forget to:
- [Gutenberg](https://github.com/WordPress/gutenberg/releases/latest/download/gutenberg.zip)

- Install the dependencies:
- [Block Interactivity Experiments](https://github.com/WordPress/block-interactivity-experiments/releases/latest/download/block-interactivity-experiments.zip). This one requires Gutenberg to work.

```sh
npm install && composer install
```
- [Movies Demo Plugin](https://github.com/WordPress/wp-movies-demo/releases/latest/download/wp-movies-plugin.zip). This one requires the Block Interactivity Experiments to work.

- Build the plugin:

2. Install the dependencies and build the plugin:

```sh
npm install && composer install
npm run build
# If you plan on tinkering with the frontend code you start the webpack
# server which automatically rebuild the files when you make any changes.
```

If you plan on tinkering with the frontend code, start the webpack
server which automatically rebuild the files when you make any changes:

```
npm start
```

2. Install the theme:
3. Install the theme:

You need to install and activate the [Movies Demo
Theme](https://github.com/WordPress/wp-movies-demo/releases/latest/download/wp-movies-theme.zip).
Expand All @@ -72,7 +71,7 @@ In order to be able to test this demo, you just need to:
npx wp-env run cli "wp theme activate wp-movies-theme"
```

3. Add the movie and actor data to the WordPress database:
4. Add the movie and actor data to the WordPress database:

You can import the data manually:

Expand All @@ -93,16 +92,16 @@ In order to be able to test this demo, you just need to:

If you run into any problems you can run `npx wp-env clean all` and start this step over again.

4. Set the permalinks to use the `Post name` in **Settings > Permalinks**.
5. Set the permalinks to use the `Post name` in **Settings > Permalinks**.

If you are using `wp-env` you can just run this command:

```sh
npx wp-env run cli "wp rewrite structure '/%postname%/'"
```

5. Change settings to show `8` posts and RSS items per page in **Settings > Reading**
6. Enable the **Client Side Navigations** in the **Settings > WP Directives**.
6. Change settings to show `8` posts and RSS items per page in **Settings > Reading**
7. Enable the **Client Side Navigations** in the **Settings > WP Directives**.

## Things to try

Expand Down

0 comments on commit d3d3ffd

Please sign in to comment.