Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@ehp/gatsby-source-drupal

gatsbyjs33MIT2.2.7

Gatsby source plugin for building websites using the Drupal CMS as a data source

gatsby, gatsby-plugin, gatsby-source-plugin

readme

gatsby-source-drupal

Source plugin for pulling data (including images) into Gatsby from Drupal sites.

Pulls data from Drupal 8 sites with the Drupal JSONAPI module installed.

An example site built with the headless Drupal distro ContentaCMS is at https://using-drupal.gatsbyjs.org/

apiBase Option allows changing the API entry point depending on the version of jsonapi used by your Drupal instance. The default value is jsonapi, which has been used since jsonapi version 8.x-1.0-alpha4.

Install

npm install --save gatsby-source-drupal

How to use

// In your gatsby-config.js
plugins: [
  {
    resolve: `gatsby-source-drupal`,
    options: {
      baseUrl: `https://live-contentacms.pantheonsite.io/`,
      apiBase: `api`, // optional, defaults to `jsonapi`
    },
  },
]

How to query

You can query nodes created from Drupal like the following:

{
  allArticle {
    edges {
      node {
        title
        internalId
        created(formatString: "DD-MMM-YYYY")
      }
    }
  }
}

changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

2.2.0-beta.4 (2018-06-21)

Note: Version bump only for package gatsby-source-drupal

2.2.0-beta.3 (2018-06-20)

Note: Version bump only for package gatsby-source-drupal

2.2.0-beta.2 (2018-06-20)

Note: Version bump only for package gatsby-source-drupal

2.2.0-beta.1 (2018-06-17)

Note: Version bump only for package gatsby-source-drupal

2.2.0-beta.0 (2018-06-17)

Note: Version bump only for package gatsby-source-drupal