4.11.0 • Published 2 years ago
gatsby-source-wordpress-graphql v4.11.0
gatsby-source-wordpress-graphql
Source plugin for pulling posts and media items from Wordpress via Graphql.
An example site for using this plugin hosted here: https://magloft.github.io/gatsby-source-wordpress-graphql/
Installation
npm install gatsby-source-wordpress-graphql
# OR
yarn add gatsby-source-wordpress-graphql
How to use
Configure Plugin Options:
{
resolve: 'gatsby-source-wordpress-graphql',
options: {
// Your Wordpress GQL Endpoint
host: 'https://www.domain.com/graphql',
// HTTP Authorization Header
authorization: 'Basic ...',
// Cache Adapter, either `gatsby` or `persist`
cacheAdapter: 'gatsby',
// Records to fetch per request
perPage: 100,
// Media Item Import batch size
batchSize: 10,
// Content transformation options via unihtml
transformContent: ({ clean }) => { clean() }
// Skip checking for new resources after initial sync
cacheOnly: false,
// List of resources to import
importResources: ['post', 'page', 'user', 'category', 'media']
}
}
Development
- Build plugin using
yarn build
- Run
yarn link
indist/
folder - Run
yarn link gatsby-source-wordpress-graphql
inexample/
folder - Create
gatsby-config.js
inexample
folder (based ondist
file) and fill inauthorization
details
4.11.0
2 years ago
3.0.0-next.9
2 years ago
3.0.0-next.8
2 years ago
3.0.0-next.6
3 years ago
3.0.0-next.7
3 years ago
3.0.0-next.5
3 years ago
3.0.0-next.4
3 years ago
3.0.0-next.3
3 years ago
3.0.0-next.2
3 years ago
3.0.0-next.1
3 years ago
3.0.0-next.0
3 years ago