Skip to content

Kick off your next, great Gatsby project with this Github source starter based on gatsby-source-github-api

License

Notifications You must be signed in to change notification settings

lundgren2/gatsby-starter-github-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gatsby

Gatsby Starter Github API

This is an example sourcing data from GitHub GraphQL API v4 using gatsby-source-graphql

How to use

  1. Create a Gatsby site.

    Use the Gatsby CLI to create a new site, specifying the default starter.

    # create a new Gatsby site using the default starter
    gatsby new my-portfolio https://github.com/gatsbyjs/gatsby-starter-default
    cd my-portfolio/
  2. Generate GitHub API Token Follow these instructions: https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/

  3. Add your generated token to the env file

mv .env.example .env
# .env
GITHUB_API_TOKEN=your-token-here
  1. Change the config for your preferences The config file is located at config/site.js

  2. Open the source code and start editing!

Open the my-portfolio directory in your code editor of choice and edit src/pages/index.js. Save your changes and the browser will update in real time!

gatsby develop

Your site is now running at http://localhost:8000!

Note: You'll also see a second link: http://localhost:8000/___graphql. This is a tool you can use to experiment with querying your data. Learn more about using this tool in the Gatsby tutorial.

Modify GitHub Query

Heads up! GitHub's GraphQL Explorer makes use of your real, live, production data.

GitHub GraphQL API

Demo

https://gatsby-starter-github-api.netlify.com/

Deploy

Deploy to Netlify

Credits

About

Kick off your next, great Gatsby project with this Github source starter based on gatsby-source-github-api

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •