mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-10-23 10:34:25 -04:00
simplify shortcode JS logic and only call AMP script if shortcodes present
fixes https://search.google.com/search-console/amp/drilldown?resource_id=sc-domain%3Ajarv.is&item_key=GgcIIhADKKZO&utm_source=wnc_10030322&utm_medium=gamma&utm_campaign=wnc_10030322&utm_content=msg_100058679&hl=en&sharing_key=VVX9zj1yTzUxHPzmKFP4Gg
This commit is contained in:
@@ -1,11 +1,19 @@
|
||||
{{ if .HasShortcode "gh-buttons" -}}
|
||||
{{ partial "scripts/shortcodes/gh-buttons" . }}
|
||||
{{ template "__shortcode_gh-buttons_js" $ }}
|
||||
{{ end -}}
|
||||
|
||||
{{ if .HasShortcode "tweet" -}}
|
||||
{{ partial "scripts/shortcodes/tweet" . }}
|
||||
{{ template "__shortcode_twitter_js" $ }}
|
||||
{{ end -}}
|
||||
|
||||
{{ if .HasShortcode "facebook" -}}
|
||||
{{ partial "scripts/shortcodes/facebook" . }}
|
||||
{{ template "__shortcode_facebook_js" $ }}
|
||||
{{ end -}}
|
||||
|
||||
{{ if .HasShortcode "instagram" -}}
|
||||
{{ template "__shortcode_instagram_js" $ }}
|
||||
{{ end -}}
|
||||
|
||||
{{ if .HasShortcode "vimeo" -}}
|
||||
{{ template "__shortcode_vimeo_js" $ }}
|
||||
{{ end -}}
|
||||
|
Reference in New Issue
Block a user