diff options
Diffstat (limited to 'docs/content/en/hugo-pipes/fingerprint.md')
-rwxr-xr-x | docs/content/en/hugo-pipes/fingerprint.md | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/docs/content/en/hugo-pipes/fingerprint.md b/docs/content/en/hugo-pipes/fingerprint.md index b58b577db..f27ef7b55 100755 --- a/docs/content/en/hugo-pipes/fingerprint.md +++ b/docs/content/en/hugo-pipes/fingerprint.md @@ -3,7 +3,6 @@ title: Fingerprinting and SRI description: Hugo Pipes allows Fingerprinting and Subresource Integrity. date: 2018-07-14 publishdate: 2018-07-14 -lastmod: 2018-07-14 categories: [asset management] keywords: [] menu: @@ -12,10 +11,8 @@ menu: weight: 70 weight: 70 sections_weight: 70 -draft: false --- - Fingerprinting and [SRI](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) can be applied to any asset file using `resources.Fingerprint` which takes two arguments, the resource object and a [hash function](https://en.wikipedia.org/wiki/Cryptographic_hash_function). The default hash function is `sha256`. Other available functions are `sha384` (from Hugo `0.55`), `sha512` and `md5`. @@ -25,5 +22,5 @@ Any so processed asset will bear a `.Data.Integrity` property containing an inte ```go-html-template {{ $js := resources.Get "js/global.js" }} {{ $secureJS := $js | resources.Fingerprint "sha512" }} -<script type="text/javascript" src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}"></script> +<script src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}"></script> ``` |