berkerpeksag / github-badge

GitHub Badge is a simple embeddable badge showing your GitHub stats like the number of public repositories, number of followers, favorite languages etc.
https://githubbadge.appspot.com/
291 stars 31 forks source link

Add markdown link #74

Closed ArtskydJ closed 4 years ago

ArtskydJ commented 10 years ago

Right now it only gives the user html embedding code. It could also give them a markdown image link.

BYK commented 10 years ago

Can people embed iframes as images in Markdown? I'm not aware of such a feature.

ArtskydJ commented 10 years ago

http://daringfireball.net/projects/markdown/syntax#img Sorry, no, not iframes in markdown: Using this syntax, ![Alt text](/path/to/img.jpg), you are able to have images in markdown. If path/to/img.jpg was replaced with http://githubbadge.appspot.com/USERNAME, and shown on the page along with the html embed code, it would give people an easy way to put a badge into a markdown document. (Although it is still possible with this method by extracting the link and manually putting it into a markdown document.)

BYK commented 10 years ago

Then I guess you are also implying that we render the content as an image instead of HTML?

ArtskydJ commented 10 years ago

I am not sure what you mean.

If I go to http://githubbadge.appspot.com/artskydj then I see the image. If I write ![badge](http://githubbadge.appspot.com/artskydj) then the badge should show up. (e.g. this comment...) badge

This is what I was asking for in this issue: 1 User types in their username in the website (like normal) 2 When the HTML embed code drops down, (like normal) and maybe some markdown code could drop down below it. The image link inside the html code could be the same link inside the markdown code.

Edit So basically I just realized that the badges are html code themselves. I thought the html was image embedding code. I guess I was implying that they could be rendered as images for markdown, but that's a little unreasonable... As the badges are not currently rendered as images, this issue can probably be closed, as it is a little unreasonable to ask you to convert the html to an image for the few people who would want a badge inside a markdown document.

BYK commented 10 years ago

Edit So basically I just realized that the badges are html code themselves. I thought the html was image embedding code. I guess I was implying that they could be rendered as images for markdown, but that's a little unreasonable... As the badges are not currently rendered as images, this issue can probably be closed, as it is a little unreasonable to ask you to convert the html to an image for the few people who would want a badge inside a markdown document.

Hah, yeah sorry for my delayed response. I was gonna point out the HTML issue.

I think there's value to keep this ticket open in case someone is willing to give it a shot. I mean the HTML and CSS are not very complex so someone may actually try and succeed converting this to an image ;)

Thanks for the suggestion!