Coder Social home page Coder Social logo

gatsby-theme-drupal's Introduction

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?)

gatsby-theme-drupal's People

Contributors

dependabot[bot] avatar grantglidewell avatar jddoesdev avatar mglaman avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.