diff options
author | Paul Twohey <twohey@users.noreply.github.com> | 2019-09-01 19:55:41 -0700 |
---|---|---|
committer | Alex Shpak <alex-shpak@users.noreply.github.com> | 2019-09-02 09:59:50 +0200 |
commit | 64dfdf39fbf6fce86ab3105e07d9130630372f35 (patch) | |
tree | 1f95e7c95263d3d0c427c6f886d1ece90ba88e9b /layouts/partials | |
parent | 964968be39f7d70c12c41eb77c51e94e1c2ccd6a (diff) |
add sub resource integrity (SRI) to processed assets
- search javascript
- SCSS processed stylesheet
Diffstat (limited to 'layouts/partials')
-rw-r--r-- | layouts/partials/docs/html-head.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/layouts/partials/docs/html-head.html b/layouts/partials/docs/html-head.html index 9946c37..3cf5054 100644 --- a/layouts/partials/docs/html-head.html +++ b/layouts/partials/docs/html-head.html @@ -4,11 +4,11 @@ <!-- Theme stylesheet, you can customize scss by creating `assets/custom.scss` in your website --> {{- $styles := resources.Get "book.scss" | resources.ToCSS | resources.Minify | resources.Fingerprint }} -<link rel="stylesheet" href="{{ $styles.RelPermalink }}"> +<link rel="stylesheet" href="{{ $styles.RelPermalink }}" integrity="{{ $styles.Data.Integrity }}"> {{ if default true .Site.Params.BookSearch }} {{- $searchJS := resources.Get "search.js" | resources.ExecuteAsTemplate "search.js" . | resources.Minify | resources.Fingerprint }} -<script defer src="{{ $searchJS.RelPermalink }}"></script> +<script defer src="{{ $searchJS.RelPermalink }}" integrity="{{ $searchJS.Data.Integrity }}"></script> {{ end }} <!-- Favicon --> |