@pantheon-systems/wordpress-kit
v3.1.3
Published
Pantheon Decoupled Kit's WordPress Kit
Downloads
1,062
Keywords
Readme
Pantheon Systems WordPress Kit
Utilities to help simplify the process of sourcing data from a WordPress backend for a Front-End Site hosted on Pantheon.
Installation
To install this package to use in your application:
npm install @pantheon-systems/wordpress-kit
Usage
Modules can be imported or required from the @pantheon-systems/wordpress-kit
package.
GraphQLClientFactory
- Import the module in your JavaScript application:
import { GraphQLClientFactory } from '@pantheon-systems/wordpress-kit';
- Create an instance of the client and specify your API:
const client = new GraphQLClientFactory( 'my.wordpressbackend.com/wp/graphql', ).create();
TailwindcssPlugin
- Import the plugin to your
tailwind.config.js
fileconst { tailwindcssPlugin } = require('@pantheon-systems/wordpress-kit');
- Add the plugin to your
plugins
array:/** @type {import('@pantheon-systems/wordpress-kit').TailwindcssConfig} */ module.exports = { content: [ ... ], theme: { ... }, plugins: [tailwindcssPlugin], };
- (Optional) Extend the plugin or override the theme. See Extending the Default Theme for more information.
API Reference
To see the API reference, visit our docs site
Contributing
Please see the Contributing guide in our monorepo for more information on contributing to the project.