mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-10-23 10:34:25 -04:00
if multiple of the same shortcode are used, only load scripts once
This commit is contained in:
3
layouts/shortcodes/facebook.html
Normal file
3
layouts/shortcodes/facebook.html
Normal file
@@ -0,0 +1,3 @@
|
||||
{{- $url := printf "https://www.facebook.com/plugins/post/oembed.json/?omitscript=1&url=%s" (.Get "url" | urlize) -}}
|
||||
{{- $json := getJSON $url -}}
|
||||
{{- $json.html | safeHTML -}}
|
Reference in New Issue
Block a user