Originally published on my blog
This is the official way to do it, the one that is mentioned in the GitHub Documentation. It consists on adding
.js and including it in an script tag:
.json to the end of the Gist URL returns something like this:
This is very useful when working with Gists server-side
Of course, you can use the GitHub API to get this content. According to the API documentation, you have to make a
GET request to
https://api.github.com/gists/$GIST_ID where Gist ID is the part of the URL that appears after your username.
Here’s an example response:
👋 Hi! I’m Miguel Piedrafita, a 15-year-old PHP artisan and open-source lover. How about connecting on Twitter?
Originally published at dev.to.
Create your free account to unlock your custom reading experience.