mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-13 16:14:59 +00:00
Fixes typo in fingerprint.md
This commit is contained in:
1 parent
0a738467bf
commit
af72acda03
1 file changed
+2
-2
@@ -16,7 +16,7 @@ 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.Fingerpint` which takes two arguments, the resource object and a [hash function](https://en.wikipedia.org/wiki/Cryptographic_hash_function).
|
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`.
|
The default hash function is `sha256`. Other available functions are `sha384` (from Hugo `0.55`), `sha512` and `md5`.
|
||||||
|
|
||||||
@@ -26,4 +26,4 @@ Any so processed asset will bear a `.Data.Integrity` property containing an inte
|
|||||||
{{ $js := resources.Get "js/global.js" }}
|
{{ $js := resources.Get "js/global.js" }}
|
||||||
{{ $secureJS := $js | resources.Fingerprint "sha512" }}
|
{{ $secureJS := $js | resources.Fingerprint "sha512" }}
|
||||||
<script type="text/javascript" src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}"></script>
|
<script type="text/javascript" src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}"></script>
|
||||||
```
|
```
|
||||||
Reference in new issue
Block a user