1.3.0 • Published 4 years ago
gatsby-source-github-repo v1.3.0
gatsby-source-github-repo
Gatsby source plugin for pulling data directly from a GitHub repository page.
It was created to retrieve information that cannot currently be accessed via the GitHub API, like the total contributor count.
Install
npm install --save gatsby-source-github-repo
How to use
In your gatsby-config.js
:
plugins: [
{
resolve: 'gatsby-source-github-repo',
options: {
repoUrl: 'https://github.com/gatsby/gatsby',
},
},
];
You can then query the data via graphql: localhost:8000/___graphql
{
gitHubRepoData {
url
description
website
topics
commitCount
releaseCount
branchCount
contributorCount
licence
languageStats {
lang
percentage
}
}
}