Skip to content

Instantly share code, notes, and snippets.

View onedrawingperday's full-sized avatar
☠️
Do not disturb

Alexandros onedrawingperday

☠️
Do not disturb
View GitHub Profile
@onedrawingperday
onedrawingperday / gist:72aee54932c46f51e310f1e2335c5c64
Created April 22, 2018 13:36
Hugo Instagram internal shortcode
{{ $urlPre := "https://api.instagram.com/oembed/?url=https://www.instagram.com/p/" }}
{{ $id := index .Params 0 }}
{{ $inst := getJSON $urlPre $id "/&maxwidth=640&omitscript=true" }}
{{ with $inst }}
{{ $split := split .media_id "_" }}
<div class="Embed" data-ios-link="media?id={{ range first 1 $split }}{{ . }}{{ end }}&amp;utm_source=ig_embed" data-permalink="https://instagram.com/p/{{ $id }}/?utm_source=ig_embed" data-log-event="bodyClick" data-media-type="GraphImage" data-media-id='{{ range first 1 $split }}{{ . }}{{ end }}' data-owner-id="{{ int .author_id }}" style="background: white none repeat scroll 0% 0%; border: 1px solid rgb(219, 219, 219); border-radius: 3px; max-width: 658px; padding: 0px; width: calc(100% - 2px); box-shadow: none; display: block; margin: 0px 0px 12px;">
<div class="Header"><div class="AvatarContainer">
<a class="Avatar" href="https://instagram.com/{{ .author_name }}/?utm_source=ig_embed&amp;action=profilevisit" data-ios-link="user?userna
ol,ul {
list-style:none
}
blockquote,q {
quotes:none
}
blockquote:after,blockquote:before,q:after,q:before {
content:none
}
table {