1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

Autoplay

    Install Plugins for Transforming Markdown with Gatsby

    Taylor BellTaylor Bell
    gatsbyGatsby
    ^2.0.0

    Gatsby makes use of various plugins for building static sites. Here we will install gatsby-source-filesystem and gatsby-transformer-remark to work with locally stored Markdown files.

    Code

    Code

    Become a Member to view code

    You must be a Member to view code

    Access all courses and lessons, track your progress, gain confidence and expertise.

    Become a Member
    and unlock code for this lesson
    Discuss

    Discuss

    Transcript

    Transcript

    Instructor: In order to have Gatsby convert our markdown into our site, we're going to need to install a couple of plugins. Let's do NPMinstall--save gatsby-source-filesystem@next and gatsby-transformer-remark@next.

    Once that's installed, we're going to create a new file called gatsby-config.JS, which contains some configuration for Gatsby in a J.S. file. We'll do module.exports. We'll provide a site metadata key, give it a title of my blog, and description of, this is my cool blog.

    Now that we have the site metadata object created, we'll add an array of plugins. First, we'll do gatsby-transformer-remark. Now we'll use an object because we're going to need to pass some options.

    We'll resolve our plugin gatsby-source-filesystem. Then it can take an options object with a name. We'll call it pages. Its path will be in our current directory, so we'll do a string template with double underscore dirname/SRC/pages.