Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

Gatsby Theme Drupal

a gatsby theme for your Drupal content

Installation

yarn add gatsby-theme-drupal

Setup

// In your gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: `gatsby-theme-drupal`,
      options: {
        baseUrl: `https://live-drupal-cms.pantheonsite.io/`
      }
    }
  ]
};

for more options see the Drupal Source Plugin

Usage

This theme will show the data in your Drupal instance and allow you to create queries and templates for this data. You can continue to use this theme or once your content has templates in place you can install gatsby-source-drupal and use it directly in place of this plugin.

Gotchas and Caveats

If you use JSON API extras there is a chance the node names have diverged from the default node__type convention used by JSON API. This will cause an issue with resolving these types in this theme. The content is in the GraphQl schema but will require manual research to find those nodes.

Another convention that this theme relies on is the provision of paths from Drupal. when querying entities that data is required. if it is not exposed or does not exist the result will be ...suboptimal(it will break).

This assumes that path-auto is turned on.

todo

  • Establish component naming convention for shadowing
  • skip templates for shadowed components
  • parse queried fields and add to component stub
  • render template with react-live (data plumbing?)

About

Gatsby Theme for building headless drupal8 sites

Resources

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •