Install Gatsby v1 and Scaffold a Blog

Taylor Bell
InstructorTaylor Bell
Share this video with your friends

Social Share Links

Send Tweet
Published 6 years ago
Updated 5 years ago

In this lesson, you’ll install Gatsby and the plugins that give the default starter the ability to transform Markdown into HTML.

Instructor: [00:00] I'm going to get started by doing npm install-g gatsby-cli. After it's done doing its thing, we'll do gatsby new, and I'll call it my blog. When it's done, I'll cd into my blog and I'm going to install couple of plugins to convert mark down into HTML. I'll do yarn add gatsby-source-filesystem and gatsby-transformer-remark.

[00:24] Now that the plugins are installed we need to add them to our gatsby-config file. I'll reformat this file a little bit. Now under plugins, we'll add gatsby-transformer-remark and then we can feed a configuration object that will set up gatsby-source-filesystem for us.

[00:37] We'll resolve gatsby-source-filesystem. For options, we'll pass the name of source, and for path, we'll give it a string template with __dirname for our current directory/src, and now we're set up.

~ 6 years ago

How do you get your vi to look like that?

Miguel Olave
Miguel Olave
~ 6 years ago

Options doesn't work for me.

I got this response:

error
The path passed to gatsby-source-filesystem does not exist on your file system:

${__dirname}/src

Please pick a path to an existing directory.

this work form me:

options: {
            name: 'pages', 

path:${__dirname}/src/pages }

Jeremy
Jeremy
~ 6 years ago

Same error with the path as above - I expect something changed with the plugin

Adams Ibrahim
Adams Ibrahim
~ 6 years ago

I'm getting yarn is not recognized as an internal or external command

Markdown supported.
Become a member to join the discussionEnroll Today