gitprofile icon indicating copy to clipboard operation
gitprofile copied to clipboard

Display one image of my github projects

Open zz9tf opened this issue 3 years ago • 5 comments

Hi Ariful,

Your gitprofile is pretty great, I'm just wondering if we could add one image above projects to make it looks more clear and funcy?

Just like what github does.

image

But I'm not sure how to do it yet, do you have any good idea?

zz9tf avatar Sep 02 '22 00:09 zz9tf

I will take a look if the image can be retrieved from the GitHub response.

arifszn avatar Sep 02 '22 04:09 arifszn

Unfortunately, GitHub API does not provide the social image URL. Please let me know if you find any other way.

arifszn avatar Sep 02 '22 07:09 arifszn

Hi, I just found a method online, it's from GitHub GraphQL API v4.

image

Result of the link: image

With the above code, we can get the social image URL. Sorry about my limited experience with website development, I'm not sure if we can use it. Origin source: https://stackoverflow.com/questions/56691229/how-can-i-get-my-social-preview-image-link-of-my-github-repo-using-git-api-or-an

zz9tf avatar Sep 04 '22 22:09 zz9tf

GitProfile is using the GitHub REST API instead of the GraphQL API. There are some major differences between those APIs. We have no plan for migrating to GraphQL currently. But any PR for the migration is welcome.

arifszn avatar Sep 05 '22 07:09 arifszn

Got it, thanks!

zz9tf avatar Sep 05 '22 13:09 zz9tf