Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions examples/next/block-support/.env.local.sample
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Your WordPress site URL
NEXT_PUBLIC_WORDPRESS_URL=https://faustexample.wpengine.com
# Your WordPress site URL. It needs WPGraphQL Content Blocks; see the README.
NEXT_PUBLIC_WORDPRESS_URL=https://your-wordpress-site.com

# Plugin secret found in WordPress Settings->Faust
# FAUST_SECRET_KEY=YOUR_PLUGIN_SECRET
FAUST_SECRET_KEY=YOUR_PLUGIN_SECRET

# Needed for sitemaps (no naming requirements for this, NEXT_PUBLIC_SITE_URL is just an example)
NEXT_PUBLIC_SITE_URL=http://localhost:3000
14 changes: 8 additions & 6 deletions examples/next/block-support/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,34 @@ Example showcasing Faust.js block editor support.

## Pre-requisites

See <https://faustjs.org/tutorial/get-started-with-faust> and <https://faustjs.org/tutorial/get-started-with-wp-graphql-content-blocks> for reference
See [Basic Setup](https://faustjs.org/docs/how-to/basic-setup/) and [Rendering Blocks](https://faustjs.org/docs/how-to/rendering-blocks/) for reference.

You have a WordPress instance with tne following plugins installed and active on your WordPress instance:
You need your own WordPress site with these plugins installed and active:

- [WPGraphQL](https://github.com/wp-graphql/wp-graphql)
- [FaustWP](https://github.com/wpengine/faustjs/tree/canary/plugins/faustwp)
- [WPGraphQL Content Blocks](https://github.com/wpengine/wp-graphql-content-blocks)

The example only has a front page template, so set a static front page in Settings > Reading and add some blocks to it.


In order to run the block-support example you need to do the following:


```bash
git clone git@github.com:wpengine/faustjs.git my-project
cd my-project/examples/next/block-support/
touch .env.local
cp .env.local.sample .env.local
```

Update the .env.local as per setup guide

```.env.local
# Your WordPress site URL
NEXT_PUBLIC_WORDPRESS_URL=https://faustexample.wpengine.com
NEXT_PUBLIC_WORDPRESS_URL=https://your-wordpress-site.com

# Plugin secret found in WordPress Settings->Headless
#FAUST_SECRET_KEY=
# Plugin secret found in WordPress Settings->Faust
FAUST_SECRET_KEY=YOUR_PLUGIN_SECRET

# The URL of your site, used by Faust for sitemap generation, however you can name this whatever you want.
NEXT_PUBLIC_SITE_URL=http://localhost:3000
Expand Down
5 changes: 0 additions & 5 deletions examples/next/custom-toolbar/.env.local.sample

This file was deleted.

34 changes: 0 additions & 34 deletions examples/next/custom-toolbar/.gitignore

This file was deleted.

24 changes: 0 additions & 24 deletions examples/next/custom-toolbar/README.md

This file was deleted.

14 changes: 0 additions & 14 deletions examples/next/custom-toolbar/faust.config.js

This file was deleted.

6 changes: 0 additions & 6 deletions examples/next/custom-toolbar/next.config.js

This file was deleted.

23 changes: 0 additions & 23 deletions examples/next/custom-toolbar/package.json

This file was deleted.

16 changes: 0 additions & 16 deletions examples/next/custom-toolbar/pages/[...wordpressNode].js

This file was deleted.

16 changes: 0 additions & 16 deletions examples/next/custom-toolbar/pages/_app.js

This file was deleted.

This file was deleted.

51 changes: 0 additions & 51 deletions examples/next/custom-toolbar/pages/example.js

This file was deleted.

9 changes: 0 additions & 9 deletions examples/next/custom-toolbar/pages/index.js

This file was deleted.

5 changes: 0 additions & 5 deletions examples/next/custom-toolbar/pages/preview.js

This file was deleted.

88 changes: 0 additions & 88 deletions examples/next/custom-toolbar/plugins/CustomToolbar.js

This file was deleted.

1 change: 0 additions & 1 deletion examples/next/custom-toolbar/possibleTypes.json

This file was deleted.

34 changes: 0 additions & 34 deletions examples/next/custom-toolbar/styles/front-page.module.css

This file was deleted.

Loading
Loading