1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-27 09:38:27 -04:00
jarv.is/layouts/shortcodes/facebook.atom.atom
Jake Jarvis 2909e934e7
rename atom shortcodes from .atom.xml to .atom.atom, and stop using symlinks
let's see if this fixes the issue of the wrong shortcode types (usually AMP) being chosen inconsistently
2020-07-19 12:29:51 -04:00

12 lines
389 B
Plaintext

{{- $url := printf "https://www.facebook.com/plugins/post/oembed.json/?omitscript=1&url=%s" (.Get "url" | urlize) -}}
{{- $json := getJSON $url -}}
<div class="embed facebook">
{{ $json.html | safeHTML }}
</div>
{{- define "__shortcode_facebook_js" }}
<div id="fb-root"></div>
<script async defer src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v5.0"></script>
{{- end }}