tpl: HTTPS the instagram Shortcode JS - hugo - [fork] hugo port for 9front
HTML git clone git@git.drkhsh.at/hugo.git
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
DIR commit 2f4e666d7e029cba176f0adae1fbe4f813a5d1de
DIR parent 1a4851f1389621e5d757caf23a389a70deedcf9e
HTML Author: Christian Oliff <christianoliff@pm.me>
Date: Wed, 26 Feb 2025 17:27:31 +0900
tpl: HTTPS the instagram Shortcode JS
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/)
Diffstat:
M tpl/tplimpl/embedded/templates/sho… | 2 +-
M tpl/tplimpl/shortcodes_integration… | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
DIR diff --git a/tpl/tplimpl/embedded/templates/shortcodes/instagram.html b/tpl/tplimpl/embedded/templates/shortcodes/instagram.html
@@ -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 -}}
DIR diff --git a/tpl/tplimpl/shortcodes_integration_test.go b/tpl/tplimpl/shortcodes_integration_test.go
@@ -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")