gatsby-plugin-github-avatar
![npm total downloads](https://camo.githubusercontent.com/092a4da7918da1b8ef44d3b72e58e7c7eb84d042de1ec5fcb2c2ffa9911014d5/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f64742f406d6963616c67656e75732f6761747362792d706c7567696e2d6769746875622d6176617461722e7376673f7374796c653d666c6174)
yarn add @micalgenus/gatsby-plugin-github-avatar
or
npm install --save @micalgenus/gatsby-plugin-github-avatar
// gatsby-config.js
module.exports = {
plugins: [
{
resolve: `@micalgenus/gatsby-plugin-github-avatar`,
options: {
username: `micalgenus`, // Github username
default: 12954607, // Github userid for default image
},
},
],
};
// example.jsx
import React from 'react';
import Avatar from '@micalgenus/gatsby-plugin-github-avatar';
export class ExampleComponent extends React.Component {
render() {
return <Avatar />;
}
}