Skip to content

Instantly share code, notes, and snippets.

@jamescridland
Last active February 3, 2019 00:57
Show Gist options
  • Save jamescridland/fd648815061acaa13fbd52f31ec92ec7 to your computer and use it in GitHub Desktop.
Save jamescridland/fd648815061acaa13fbd52f31ec92ec7 to your computer and use it in GitHub Desktop.
Chromebook setup for Gatsby

This assumes you're running ChromeOS with Linux inside.

Turn on Linux

  • Hit the clock in the taskbar
  • Hit the settings cog
  • Type "Linux" in the search at the top
  • Press the big button that enables Linux ('turn on' then 'install').

Wait for a bit while it does its thing. (Wait for a bit, honestly, don't idly search the web, things will go wrong).

Install node.js

Open the Terminal. This is in your apps list (hit the search button to see it) and is probably under a new folder called "Linux Apps". Type the following:

sudo apt-get update  
sudo apt-get install curl gnupg -y  
curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -  
sudo apt-get install -y nodejs  

You can test that things are all working by typing the following, which should return the version you've just installed. If you see this, all is good.

node --version
npm --version

Install git

Still in the Terminal, type:

sudo apt-get install git  
git config --global user.name "Your actual real name"  
git config --global user.email "Your actual real email"  

Install gatsby

Still in the Terminal, type:

sudo npm install --global gatsby-cli

Test it's working

gatsby --version
gatsby --help

Build your first site

gatsby new hello-world https://github.com/gatsbyjs/gatsby-starter-hello-world
cd hello-world
gatsby develop

(The first command here will take a couple of minutes, don't panic!)

...and finally, go back to your browser and visit http://localhost:8000 - look, you've installed Gatsby.

Add Amazon S3 deployment

sudo apt-get install python python-pip
sudo pip install awscli
aws configure

You'll want to set up an IAM account.

...and follow the instructions over here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment