Skip to content

Commit 32c8cf7

Browse files
authored
Feat: Update block-support-example docs (#2008)
* Fixed block-support as BlockB type is undefined and throws a 500 error * Reverted changes and added docs into the README for block support example * Update README.md Updated link and also preview link for Faust.
1 parent bdd3a16 commit 32c8cf7

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,50 @@
11
# @faustwp/block-support-example
22

33
Example showcasing Faust.js block editor support.
4+
5+
6+
# How to setup block-support-example
7+
8+
## Pre-requisites
9+
10+
See <https://faustjs.org/tutorial/get-started-with-faust> and <https://faustjs.org/tutorial/get-started-with-wp-graphql-content-blocks> for reference
11+
12+
You have a WordPress instance with tne following plugins installed and active on your WordPress instance:
13+
14+
- [WPGraphQL](https://github.com/wp-graphql/wp-graphql)
15+
- [FaustWP](https://github.com/wpengine/faustjs/tree/canary/plugins/faustwp)
16+
- [WPGraphQL Content Blocks](https://github.com/wpengine/wp-graphql-content-blocks)
17+
18+
19+
In order to run the block-support example you need to do the following:
20+
21+
22+
```bash
23+
git clone [email protected]:wpengine/faustjs.git my-project
24+
cd my-project/examples/next/block-support/
25+
touch .env.local
26+
```
27+
28+
Update the .env.local as per setup guide
29+
30+
```.env.local
31+
# Your WordPress site URL
32+
NEXT_PUBLIC_WORDPRESS_URL=https://faustexample.wpengine.com
33+
34+
# Plugin secret found in WordPress Settings->Headless
35+
#FAUST_SECRET_KEY=
36+
37+
# The URL of your site, used by Faust for sitemap generation, however you can name this whatever you want.
38+
NEXT_PUBLIC_SITE_URL=http://localhost:3000
39+
40+
```
41+
42+
Finally
43+
```
44+
nvm use
45+
npm install
46+
npm run blockset
47+
npm run dev
48+
```
49+
50+
Your site should now be working on http://localhost:3000

0 commit comments

Comments
 (0)