Skip to content

Create RFC for extending Gatsby's WordPress plugin #5796

@m-allanson

Description

@m-allanson

Summary

Create an RFC to spec out extension points to gatsby-source-wordpress.

Add extension points to gatsby-source-wordpress to allow it to work with additional gatsby plugins. This would enable usage with a variety of WordPress setups (e.g. WooCommerce, Gravity Forms) without having to directly support everything within gatsby-source-wordpress.

Basic example

See discussion at #5599 (comment)

A config might look like:

// In your gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: `gatsby-source-wordpress`,
      options: {
        plugins: [
          {
            resolve: `gatsby-wordpress-woocommerce`,
            options: {
              // options here
            },
          },
          {
            resolve: "gatsby-wordpress-gravity-forms",
            options: {
              // more options
            },
          },
        ],
      },
    },
  ],
}

Motivation

WordPress can be used in many different ways. Supporting every available WordPress plugin within gatsby-source-wordpress is likely to become unwieldy quite quickly. Adding plugin support to the gatsby-source-wordpress would allow the Gatsby community to evolve with the WordPress community.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedIssue with a clear description that the community can help with.stale?Issue that may be closed soon due to the original author not responding any more.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions