{{ $r := .r }}
{{ $attr := .attributes | default dict }}
{{ if hugo.IsDevelopment }}
	<script
		src="{{ $r.RelPermalink }}"
	{{ template `render-attributes` $attr }}>
	</script>
{{ else }}
	{{ with $r | fingerprint }}
		<script
			src="{{ .RelPermalink }}"
			integrity="{{ .Data.Integrity }}"
			crossorigin="anonymous"
		{{ template `render-attributes` $attr }}>
		</script>
	{{ end }}
{{ end }}
