The repository contains a WordPress Docker container plus a Gatsby theme that supports live previews and a starter site.
-
RECURSIVELY Clone this repo.
git clone --recursive ... -
Rename
theme/sample.env>.env& enter creds. Hint: current creds will work. -
In the root of the repo run
yarn -
From the
themedirectory, rundocker-compose up -
Run through WordPress install @ http://localhost:3030
-
Activate WPGraphQL plugin
-
Activate WP Headless theme
-
Enable Permalinks
-
Fire up the Gatsby Starter Site: In the root of the project run
yarn workspace site develop -
Navigate to the "Hello World" post, change something & click the preview button
Yes! The included WordPress theme registers a beer custom post type. Simply add a beer post and click the preview button.
-
Both the WordPress Docker container need to run on the same domain. Locally this is, of course,
localhost:anyport. In production, this could also behttps://mydomain.com+https://data.mydomain.com. -
Gutenberg is disabled. There are some outstanding bugs in regards to filtering
preview_post_linknoted here. -
Gatsby must run on port
:8000.Access-Control-Allow-Originheader is hard-coded in to8000inheaders.php