Skip to content

Commit ad76462

Browse files
committed
Add 'digest' option to README
1 parent 102a470 commit ad76462

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

readme.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
![Release](https://flat.badgen.net/packagist/v/bnomei/kirby3-fingerprint?color=ae81ff)
44
![Downloads](https://flat.badgen.net/packagist/dt/bnomei/kirby3-fingerprint?color=272822)
55
[![Build Status](https://flat.badgen.net/travis/bnomei/kirby3-fingerprint)](https://travis-ci.com/bnomei/kirby3-fingerprint)
6-
[![Coverage Status](https://flat.badgen.net/coveralls/c/github/bnomei/kirby3-fingerprint)](https://coveralls.io/github/bnomei/kirby3-fingerprint)
7-
[![Maintainability](https://flat.badgen.net/codeclimate/maintainability/bnomei/kirby3-fingerprint)](https://codeclimate.com/github/bnomei/kirby3-fingerprint)
6+
[![Coverage Status](https://flat.badgen.net/coveralls/c/github/bnomei/kirby3-fingerprint)](https://coveralls.io/github/bnomei/kirby3-fingerprint)
7+
[![Maintainability](https://flat.badgen.net/codeclimate/maintainability/bnomei/kirby3-fingerprint)](https://codeclimate.com/github/bnomei/kirby3-fingerprint)
88
[![Twitter](https://flat.badgen.net/badge/twitter/bnomei?color=66d9ef)](https://twitter.com/bnomei)
99

1010

@@ -18,7 +18,7 @@ File Method and css/js helper to add cachebusting hash and optional [Subresource
1818
> If my work helped you to make some cash it seems fair to me that I might get a little reward as well, right?<br><br>
1919
> Be kind. Share a little. Thanks.<br><br>
2020
> &dash; Bruno<br>
21-
> &nbsp;
21+
> &nbsp;
2222
2323
| M | O | N | E | Y |
2424
|---|----|---|---|---|
@@ -60,19 +60,19 @@ echo $page->file('ukulele.pdf')->integrity();
6060
6161
// generate sri from local file
6262
echo Bnomei\Fingerprint::js(
63-
'/assets/js/index.min.js',
63+
'/assets/js/index.min.js',
6464
[
6565
"integrity" => true
6666
]
67-
);
67+
);
6868
/*
6969
<script src="https://../assets/js/index.min.js"
7070
integrity="sha384-oqVuAfXRKap7fdgcCY5uykM6+R9GqQ8K/uxy9rx7HNQlGYl1kPzQho1wx4JwY8wC"
7171
crossorigin="anonymous"></script>
7272
*/
7373
7474
echo Bnomei\Fingerprint::js(
75-
'https://external.cdn/framework.min.js',
75+
'https://external.cdn/framework.min.js',
7676
[
7777
"integrity" => "sha384-oqVuAfXRKap7fdgcCY5uykM6+R9GqQ8K/uxy9rx7HNQlGYl1kPzQho1wx4JwY8wC"
7878
]
@@ -86,10 +86,11 @@ echo Bnomei\Fingerprint::js(
8686
8787
## Settings
8888
89-
| bnomei.fingerprint. | Default | Description |
89+
| bnomei.fingerprint. | Default | Description |
9090
|---------------------------|----------------|-------------------------------------------------------------------------------------|
9191
| hash | `callback` | will lead to the hashing logic |
9292
| integrity | `callback` | use it to set option `'integrity' => null,` |
93+
| digest | `'sha384'` | Cryptographic digest to be used for SRI hashes either `'sha256'`, `'sha384'` or `'sha512'`. |
9394
| https | `true` | boolean value or callback to force *https* scheme on all but localhost enviroments. |
9495
| query | `true` or `string` or `callback` | `myfile.js?v={HASH}`, `myfile.{HASH}.js` or loaded from manifest file |
9596
@@ -106,7 +107,7 @@ This is the default since it works without additional changes to your server but
106107
107108
If you disable the query option you also also need to add apache or nginx rules. These rules will redirect css and js files from with hash to the asset on disk.
108109
109-
**.htaccess** put this directly after the `RewriteBase` statment
110+
**.htaccess** - put this directly after the `RewriteBase` statment
110111
```apacheconfig
111112
# RewriteBase /
112113
RewriteCond %{REQUEST_FILENAME} !-f

0 commit comments

Comments
 (0)