Skip to content

Instantly share code, notes, and snippets.

@jcandan
Last active June 7, 2019 17:19
Show Gist options
  • Save jcandan/970fafdc9ce456c47e88a2d0be318eae to your computer and use it in GitHub Desktop.
Save jcandan/970fafdc9ce456c47e88a2d0be318eae to your computer and use it in GitHub Desktop.
DCCHATT 2019 Drupal Gatsby Training
name: 2019-drupal-gatsby-training
proxy:
appserver:
- 2019-drupal-gatsby-training.lndo.site:8000
services:
appserver:
type: node:10
port: 8000
globals:
gatsby-cli: latest
tooling:
npm:
service: appserver
node:
service: appserver
gatsby:
service: appserver
yarn:
service: appserver
$ lando yarn install
$ lando gatsby new my-drupal-gatsby
$ lando gatsby develop --host 0.0.0.0

Your Gatsby url can be found via

$ lando info

Visit http://MYSITE.lndo.site/___graphql

In gatsby-config.js, modify the slogan

slogan: `My slogan is better than yours`

Paste the following query to graphql explorer

{
  site {
    siteMetadata {
      title
      slogan
      author
    }
  }
}

When you need to install an NPM package, use

$ lando yarn add <package>

Example:

$ lando yarn add gatsby-source-drupal

Whenever you are ready to change branches, be sure you do the following:

$ git checkout 01-branch-name
$ git reset --hard 01-branch-name
$ lando yarn install
$ lando gatsby develop --host 0.0.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment