This starter is forked from the gatsby-starter-netlify-cms and modified to use WordPress instead of netlify-cms, using the gatsby-source-wordpress plugin as the data connector.
Demo: https://gatsby-starter-wordpress.netlify.com/
gatsby new NAME https://github.com/GatsbyCentral/gatsby-starter-wordpress
- Edit
gatsby-config.js
, changebaseUrl
- Make sure you have at least 1 post and 1 page on your WordPress site
- Make sure at least 1 post has at least 1 tag
- Ensure the permalink structure in your WordPress installation is set to
Post Name
instead of the deafultPlain
, or else thegatsby-source-wordpress
plugin won't be able to communicate with WordPress - Rejoice
- For more information on the source plugin, check out the gatsby-source-wordpress repository page
- File any issues here
- This is based on the netlify starter which uses bulma. This adds 150KB to every built page.
- Your WordPress site must have at least 1 post with 1 tag, or the starter will crash
- Nested pages / categories will not render with nested pages
- A WordPress page like
/about/team/
will render on Gatsby as/team/
- Likewise for categories
- Discussion here GatsbyCentral/gatsby-starter-wordpress#24
- A WordPress page like
This plugin uses gatsby-plugin-purgecss and bulma. The bulma build would otherwise be ~170K which adds 170K to each of your built HTML pages. However, with purgecss this is reduced 90%.
Check the gatsby-source-wordpress plugin for more information. If you want to copy the demo content, you can grab the WordPress XML export here and import it into your WordPress site as a starting point.
This starter was forked from the netlify starter by the GatsbyCentral crew. Additional contributions were gratefully received from the following folks: