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: Gist JSON #107

Closed
Aetherinox opened this issue Sep 24, 2023 · 2 comments
Closed

Feature Request: Gist JSON #107

Aetherinox opened this issue Sep 24, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@Aetherinox
Copy link

Aetherinox commented Sep 24, 2023

love the app, but if I could possibly request one feature that I would love to see.

Github gist's have the ability to add .JSON at the end of a gist URL, and you'll get a json formatted version which shows the creation date, the body, author, etc.

Would there be any possible way we could get this added to the TODO list? As an example, I took a random gist URL from someone.
You can view the gist via https://gist.github.com/lbialy/44e627ff17034b1fb53b6a75f35ed9ac

However, if you go to https://gist.github.com/lbialy/44e627ff17034b1fb53b6a75f35ed9ac.json, you can view various pieces of info about the gist, but in json format. It would help with pulling gists from 3rd party programs immensely.

The cool part of the json is that it includes a div value, which is premade HTML to show the gist in a github styled box. Then I can pull that .json URL from other programs and it will integrate the code box and contents inside my program.

And then there's a stylesheet value which leads to something like https://github.githubassets.com/assets/gist-embed-3c6bff8100e5.css

With a 3rd party program, I can use javascript to include that CSS file from the JSON, and then pull the contents of div and display the gist box anywhere I use the javascript.

@thomiceli thomiceli added the enhancement New feature or request label Sep 24, 2023
@thomiceli thomiceli added this to the v1.6 milestone Oct 4, 2023
@thomiceli
Copy link
Owner

The cool part of the json is that it includes a div value, which is premade HTML to show the gist in a github styled box. Then I can pull that .json URL from other programs and it will integrate the code box and contents inside my program.

This is something I also wanted to implement (regardless of the json part), but I had trouble to make it work. Will definitely implement this in the future.

@Aetherinox
Copy link
Author

Aetherinox commented Oct 5, 2023

Thanks. The json with the DIV would be a huge thing if possible. I thought about coding it (web developer by trade), but I haven't screwed with an ounce of Go, just PHP, JS.

This app is pretty damn near perfect, just the json + div, and maybe a few random things here and there. Gists should be simple by nature, but being able to pull gists from external sources like Obsidian.md would be a huge bonus.
My annoyance with Github is that the stylesheet json field I pointed out displays in a white theme. I'd kill to have a dark theme for gists so I can pull the stylesheet / div from the json file and integrate my gists seamlessly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants