Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/themefisher/meghna-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan <58769763+developer-evan@users.noreply.github.com>2020-06-27 07:10:37 +0300
committerGitHub <noreply@github.com>2020-06-27 07:10:37 +0300
commit39e30adc925531aa7a832d88669ceb2168e70963 (patch)
tree9c1e5d357b89ae171a255e988cd6195921fe502b /layouts
parent45f20c2383a66f4a2c9fac3beec54ff326001a0e (diff)
parent50d0b51d70e171634897ab22a8dd0166ff71dac5 (diff)
Merge pull request #120 from divinerites/Use-fingerprint-for-.resources
Add fingerprint + integrity when use resources.
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/footer.html4
-rw-r--r--layouts/partials/head.html4
2 files changed, 4 insertions, 4 deletions
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index b5072d1..4da37c4 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -38,5 +38,5 @@
{{ end }}
{{ "<!-- Main Script -->" | safeHTML }}
-{{ $script := resources.Get "js/script.js" | minify}}
-<script src="{{ $script.Permalink }}"></script>
+{{ $script := resources.Get "js/script.js" | minify | fingerprint "sha384"}
+<script src="{{ $script.Permalink }}" integrity="{{ $script.Data.Integrity }}"></script>
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index ecc0a63..83ee8da 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -15,8 +15,8 @@
{{ end }}
{{"<!-- Main Stylesheet -->"|safeHTML}}
- {{ $styles := resources.Get "css/style.css" | minify}}
- <link rel="stylesheet" href="{{ $styles.Permalink }}" media="screen">
+ {{ $styles := resources.Get "css/style.css" | minify | fingerprint "sha384" }}
+ <link rel="stylesheet" href="{{ $styles.Permalink }}" integrity="{{ $styles.Data.Integrity }}" media="screen">
{{"<!-- Custom stylesheet - for your changes -->" |safeHTML}}
<link rel="stylesheet" href="{{ `css/custom.css` | relURL}}" media="screen">