@pantheon-systems/wordpress-kit
TypeScript icon, indicating that this package has built-in type declarations

3.1.3 • Public • Published

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

  1. Import the module in your JavaScript application:
    import { GraphQLClientFactory } from '@pantheon-systems/wordpress-kit';
  2. Create an instance of the client and specify your API:
    const client = new GraphQLClientFactory(
    	'my.wordpressbackend.com/wp/graphql',
    ).create();

TailwindcssPlugin

  1. Import the plugin to your tailwind.config.js file
    const { tailwindcssPlugin } = require('@pantheon-systems/wordpress-kit');
  2. Add the plugin to your plugins array:
    /** @type {import('@pantheon-systems/wordpress-kit').TailwindcssConfig} */
    module.exports = {
      content: [ ... ],
      theme: { ... },
      plugins: [tailwindcssPlugin],
    };
  3. (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.

Readme

Keywords

none

Package Sidebar

Install

npm i @pantheon-systems/wordpress-kit

Weekly Downloads

101

Version

3.1.3

License

GPL-3.0-or-later

Unpacked Size

166 kB

Total Files

36

Last publish

Collaborators

  • mel-miller
  • cat.kaethler
  • zzyou
  • cobypear
  • backlineint
  • pantheon-npm