Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Pin gists the way we pin repos #13

Closed
ucalyptus2 opened this issue Jul 10, 2020 · 10 comments
Closed

[Feature Request] Pin gists the way we pin repos #13

ucalyptus2 opened this issue Jul 10, 2020 · 10 comments

Comments

@ucalyptus2
Copy link

No description provided.

@anuraghazra anuraghazra added the enhancement New feature or request. label Jul 10, 2020
@anuraghazra
Copy link
Owner

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

@nombrekeff
Copy link
Contributor

That would be a cool addition :)

@anuraghazra
Copy link
Owner

@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.

@nombrekeff
Copy link
Contributor

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.

@anuraghazra
Copy link
Owner

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

@nombrekeff
Copy link
Contributor

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.

@anuraghazra
Copy link
Owner

Sound good to me :D

@anuraghazra anuraghazra added feature and removed enhancement New feature or request. labels Jul 15, 2020
@dominic-m-silveira
Copy link

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.

@nathanchu
Copy link
Contributor

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...

@anuraghazra
Copy link
Owner

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.

gracecarrillo pushed a commit to gracecarrillo/github-readme-stats that referenced this issue Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants