I'm trying to embed Instagram posts into posts on my Jekyll site. I'm using the oEmbed method. The URL that Instagram documentation has, gives a JSON which contains a key-value pair for HTML which is what I want to extract.
Here's what I'm trying to do:
- Enter the shortcode for the image in a post frontmatter (
instagram: fA9uwTtkSN) - Call an
includethat takes in the shortcode and makes an oEmbed call, to get to the JSON (https://api.instagram.com/oembed?url=http://instagr.am/p/{{ page.instagram }}/) - Extract the value for the
HTMLkey, and place it in the post.
I'm trying to write an include that does it, without the use of a Ruby plugin.
Pointers, please?