1

Is there a way to embed a GitHub repo overview (showing its stats, creator and description, etc.) into a webpage?

In Slack, if you paste a GitHub repo URL, it will show the repo description and user thumbnail.

slack onebox of github repo

I'm wondering if there something like this:

<>some html that contains GitHub repo url</>
<script src="some js it provides"></script>

and it could show me the same thing on a webpage.

There's a way to embed GitHub Gists, but is there one for GitHub repos?

1

Finally I found this

https://github.com/lepture/github-cards

It's exactly what I want.

0

Yes, there is a way. https://developer.github.com/v3/repos/

Make a get request with curl to the Gitgub API and the API will return relevant data in a json array.

  • I'm aware of this, that's not what I exactly need. – laike9m Apr 26 '15 at 2:33
  • I understand this is not completely what you need. What you are asking cannot be done with just JavaScript and HTML. You will need to connect to the GitHub API and then make a curl request. Once you make the curl request you can format the JSON data with JavaScript in an HTML page. I hope this helps. – Mike Stratton Apr 26 '15 at 5:32
  • Sure. In fact I'm not asking how to do this, but is it already done. – laike9m Apr 26 '15 at 6:40

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.