- Context: #1262, https://github.com/google/docsy/pull/1262/files#r990642799 - Factor out an equivalent of the following into a `script` partial: ```html {{ $c2cJS := resources.Get "js/click-to-copy.js" -}} {{ if hugo.IsProduction -}} {{ $c2cJS = $c2cJS | minify | fingerprint -}} {{ end -}} <script defer src="{{ $c2cJS.RelPermalink }}" {{ with $c2cJS.Data.Integrity -}} integrity="{{ . }}" {{ end -}} crossorigin="anonymous"></script> ``` Notes: - For local resources, we don't need `crossorigin` AFAIK. In anycase, `anonymous` is the default. Note sure why it has been specified explicitly. - [MDN docs on crossorigin](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin) /cc @geriom