Skip to content

gatsbyjs + wordpress running in a docker + preview and i18n + local-filesystem

Notifications You must be signed in to change notification settings

webmaeistro/gatsby-headlesswp-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gatsby

headles WordPress running in docker + Gatsby + Preview Starter

The repository contains a WordPress Docker container plus a Gatsby theme that supports live previews and a starter site. hope it works for you !

🚀 Quick start

  1. RECURSIVELY Clone this repo. git clone --recursive ...

  2. Rename theme/sample.env > .env & enter creds. Hint: current creds will work.

  3. In the root of the repo run yarn

  4. From the theme directory, run docker-compose up

  5. Run through WordPress install @ http://localhost:3030

  6. Activate WPGraphQL plugin

  7. Activate WP Headless theme

  8. Enable Permalinks

  9. Fire up the Gatsby Starter Site: In the root of the project run yarn workspace site develop

  10. Navigate to the "Hello World" post, change something & click the preview button

Custom Post Type Previews?

Yes! The included WordPress theme registers a beer custom post type. Simply add a beer post and click the preview button.

Known limitations:

  1. Both the WordPress Docker container need to run on the same domain. Locally this is, of course, localhost:anyport. In production, this could also be https://[YOUR DOMAIN] + https://data.[YOUR DOMAIN].

  2. Gutenberg is disabled. There are some outstanding bugs in regards to filtering preview_post_link noted here.

  3. Gatsby must run on port :8000. Access-Control-Allow-Origin header is hard-coded in to 8000 in headers.php

About

gatsbyjs + wordpress running in a docker + preview and i18n + local-filesystem

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published