A Gatsby starter that has the Gatsby Theme Publisher installed and preconfigured.
For a full tutorial, please see our article on headless WordPress with Gatsby.
These sites all use the Publisher theme with WordPress as the backend.
- Clone this repo:
git clone https://github.com/staticfuse/create-gatsby-theme-publisher.git
- cd into the folder
cd create-gatsby-theme-publisher
(You can change the project folder name, and theme name in package.json) - Install dependencies
yarn
- Install WPGraphQL plugin on your WordPress site
- Configure your site options in gatsby-config.js Explanation of the options is below
- Start the demo site
gatsby develop
- Add your logo and customize the theme
- Publish to Netlify or any static host.
yarn add @staticfuse/gatsby-theme-publisher
ornpm install @staticfuse/gatsby-theme-publisher
- In your
gatsby-config.js
:
module.exports = {
siteMetadata: {
title: 'Static Fuse',
description: 'Headless WordPress with Gatsby FTW.',
author: 'Scott and Justin',
twitter: '@staticfuse',
siteUrl: `https://staticfuse.com`,
},
plugins: [
{
resolve: `@staticfuse/gatsby-theme-publisher`,
options: {
starterPages: true, // add a customizable home, about, and contact page
mailChimpEndpoint: 0, // https://www.gatsbyjs.org/packages/gatsby-plugin-mailchimp/#mailchimp-endpoint
dynamicComments: 1, // enable comments
gaTrackingId: 0, // google analytics tracking
wordPressUrl: `https://mywpinstall.com`, // The url of your WordPress install
blogURI: '/blog' // The page to display your posts
},
},
],
}
For theme options, customization, and more, please view the main readme file here.