Skip to content

Commit dfc0c66

Browse files
authored
Add integrity attribute to script used by CNCF Landscape shortcode (#45412)
* Add integrity attribute to script * Add integrity attribute to script * Add integrity attribute to script
1 parent 247d637 commit dfc0c66

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

layouts/partials/head.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@
9191
<script defer src="{{ "js/release_binaries.js" | relURL }}"></script>
9292
{{- end -}}
9393

94+
{{- if .HasShortcode "cncf-landscape" -}}
95+
<script src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/4.3.9/iframeResizer.min.js" integrity="sha384-hHTwgxzjpO1G1NI0wMHWQYUxnGtpWyDjVSZrFnDrlWa5OL+DFY57qnDWw/5WSJOl" crossorigin="anonymous"></script>
96+
{{- end -}}
97+
9498
{{- if eq (lower .Params.cid) "community" -}}
9599
{{- if eq .Params.community_styles_migrated true -}}
96100
<link href="/css/community.css" rel="stylesheet"><!-- legacy styles -->

layouts/shortcodes/cncf-landscape.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
</script>
5858
{{- end -}}
5959
<div id="frameHolder">
60-
<script src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/4.3.9/iframeResizer.min.js"></script>
6160
{{ if ( .Get "category" ) }}
6261
<iframe id="iframe-landscape" src="https://landscape.cncf.io/embed/embed.html?key={{ .Get "category" }}&headers=false&style=shadowed&size=md&bg-color=%233371e3&fg-color=%23ffffff&iframe-resizer=true" style="width: 1px; min-width: 100%; min-height: 100px; border: 0;"></iframe>
6362
<script>

0 commit comments

Comments
 (0)