Skip to content

Commit

Permalink
tpl: HTTPS the instagram Shortcode JS
Browse files Browse the repository at this point in the history
This JavaScript will always load over HTTPS so it's best to specify that. Protocol-less loaded resources are an anti-pattern (REF: https://www.paulirish.com/2010/the-protocol-relative-url/)
  • Loading branch information
coliff authored Feb 26, 2025
1 parent 1a4851f commit 2f4e666
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tpl/tplimpl/embedded/templates/shortcodes/instagram.html
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,6 @@
</div>
</blockquote>
{{- if not .pc.Simple -}}
<script async src="//www.instagram.com/embed.js"></script>
<script async src="https://www.instagram.com/embed.js"></script>
{{- end -}}
{{- end -}}
2 changes: 1 addition & 1 deletion tpl/tplimpl/shortcodes_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ Content: {{ .Content }}

// Regular mode
b := hugolib.Test(t, files)
b.AssertFileContent("public/index.html", "a7937c49665872d3")
b.AssertFileContent("public/index.html", "6e93404b93277876")

// Simple mode
files = strings.ReplaceAll(files, "privacy.instagram.simple = false", "privacy.instagram.simple = true")
Expand Down

0 comments on commit 2f4e666

Please sign in to comment.