Getting Started

Second Edition adds your Instagram feed to Gatsby's data layer, allowing you to add your Instagram posts alongside all the other content on your site.

Quick Start

The fastest way to get up and running with Second Edition is with our starter blog template. Each of your Instagram posts will become a blog post, each with big beautiful images and a rich-text caption. You'll only have to edit one line in the template to get up and running.

Requirements

We're going to store our code on GitHub and deploy the site on Vercel. You'll need accounts for both.

Note: If you prefer another hosting provider, e.g. Netlify, then by all means use that. Ditto if you prefer to host your code someplace else.

Steps

  • Open your Second Edition Account page.
    • If you don't already have an access token, click Reset.
    • Copy the access token.
  • Copy our starter template on GitHub.
    • Click Use this template.
    • Choose a name for the new repository (you can change it later).
    • Because in the next step we will put an access token here, make the new repository Private.
    • Click Create repository from template.
  • We need to add your access token to /gatsby-config.js. If you're new to GitHub (or simply in a hurry) then consider using their online editor to make this one-line change.
    • Find the line containing gatsby-source-secondedition.
    • Just below is this line: // accessToken: "".
    • Uncomment this line by removing the leading slashes and then paste your access token between the quotes. The end result will look something like this:
      ...
      ...
      {
      resolve: "gatsby-source-secondedition",
        options: {
          // Copy paste this from:
          // https://secondedition.io/account
          accessToken: "abcdefghikabcdefghikabcdefghikabcdefghikabcdefghik",
          //
          // Change this number to see more/fewer of your posts
          // maxPosts: 25
        },
      },
      ...
      ...
      
  • Open Vercel.
    • Click Add New... and click "Project" from the drop-down menu.
    • If your GitHub account is linked with your Vercel account, you should already see the name of the repository you just created in the list under Import Git Repository. Find it, and click the Import button next to it.
    • The Configure Project page should open. The default options should be fine for now. Click Deploy. After a few minutes, you should see a preview of your site and a link to open it for real.

Congratulations, your new blog is up and runnning!

Next steps

TODO: set a friendly URL, acquire a domain name, etc.

Deep Dive

TODO: Want to use some other starter, or build your own Gatsby application completely from scratch? Let's go.