Github-readme-stats: [Feature Request] Pin gists the way we pin repos

Created on 10 Jul 2020  路  10Comments  路  Source: anuraghazra/github-readme-stats

feature

All 10 comments

Thanks @forkbabu i'll see what i can do :D

That would be a cool addition :)

@nombrekeff yup, although i don't know how do i handle the syntax highlighting because github-readme-stat returns SVG images and it has to be static. so i think i might have to write a whole syntax highlighter for svg elements..

also SVG texts are not really optimal in terms of alignment, it's a real pain to get things where we want.

Ohh, I see, definitely tricky... Didn't think about that... maybe just show the title and description and star count?

Even if you could highlight the code, you wouldn't want to show the full gist. I would imagine as it would take a lot of space.

yes true... maybe i can just show the gists stats

I haven't looked at the source code yet, but I will be taking a look at it this evening and will try and help you out a bit with this.

Sound good to me :D

Ohh, I see, definitely tricky... Didn't think about that... maybe just show the title and description and star count?

Even if you could highlight the code, you wouldn't want to show the full gist. I would imagine as it would take a lot of space.

Github Gist's doesn't have a title, it only has a Description(optional field), and Files(1 or multiple files) in same gist and gist URL (uniquely generated ID) and star can be counted.


Opt-1:

The project has to use unique ID (randomly generated by Github for Gists) instead of title, since description is optional.

Opt-2:

Let user enter the Gist title in the URL of the API /api?gist_title=Sample-for-Hello-world&....

Opt-3:

Let the user decide to use Unique ID of Gist as title OR enter title in the URL of the API.

yup, although i don't know how do i handle the syntax highlighting because github-readme-stat returns SVG images and it has to be static. so i think i might have to write a whole syntax highlighter for svg elements..

also SVG texts are not really optimal in terms of alignment, it's a real pain to get things where we want.

The only solution I have is to use <foriegnObject> and Prism (which can be used backend I think). IMO the pinned gist card should look like a github pinned gist, so it should have a preview of the code...

I've decided that we won't include this feature even if it's possible since github-readme-stats is focused toward showing statistics and not the gist's contents, so it would be rather nice if we could do something like "Github Gist Stats" Which would show stats of total gists and stars on the gists but this gists card we won't include at the moment.

Feel free to open another issue for further discussions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

deep5050 picture deep5050  路  3Comments

harshagv picture harshagv  路  5Comments

Math-O5 picture Math-O5  路  5Comments

NikhilCodes picture NikhilCodes  路  3Comments

cachecleanerjeet picture cachecleanerjeet  路  4Comments