About this training
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
A training workshop by Mediacurrent.
This repo will allow you to get the codebase to build a new Gatsby website which has been configured to pull its content from Drupal. Both Gatsby and Drupal run locally.
macOS 10.13 or later
Windows 10 Pro+ or equivalent (eg Windows 10 Enterprise) with Hyper-V running
Linux with kernel version 4.x or higher
Docker - macOS or Windows 10
Lando - macOs or Windows 10
NVM
NodeJS & NPM
Instructions for installing NVM, Node & NPM on macOS or Windows.
You can clone or download the repo anywhere in your computer (i.e. Sites, Downloads, Documents, Desktop, etc.)
git clone git@github.com:mariohernandez/gatsby_training.git
Before you can run gatsby commands like gatsby develop
, you need to install the Gatsby CLI globally.
Open your command line tool like Terminal (macOs), or PowerShell (Windows)
Run the following command:
npm install -g gatsby-cli
After cloning the repo, cd into the newly created directory:
NOTE: This is the default directory generated by cloning the repo. If you changed the directory name when cloning the repo, cd into that directory instead.
cd gatsby_training
lando start
This will build your Docker containers needed to run Gatsby and Drupal. NOTE: Docker needs to be running before running lando start
.
Since Gatsby pulls data from Drupal, Drupal needs to be running by completing the previous step first.
cd gatsby
nvm use
If you get errors, you can try running: nvm install
then nvm use
. This will use the version of node specified inside .nvmrc
npm install
This will install all of Gatsby/node dependencies.
gatsby develop
This will start Gatsby which should immediately connect to Drupal to pull all content.
http://localhost:8000/___graphql
https://nitflex.lndo.site/user/login
Your credentials are: username: admin
, password: admin