From 0e381ab120e760860bb6379170689e2ba3adf060 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Wed, 11 Jan 2017 10:42:49 +0200 Subject: [PATCH] Start using SRI hashes for CSS/JS assets Uses Hugo's site data mechanism to load pre-generated asset hashes. --- data/sri.toml | 3 +++ layouts/_default/baseof.html | 2 +- layouts/partials/cookie-consent.html | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 data/sri.toml diff --git a/data/sri.toml b/data/sri.toml new file mode 100644 index 0000000..62d0ff2 --- /dev/null +++ b/data/sri.toml @@ -0,0 +1,3 @@ +style = "sha384-qRVpIj9hSzsBhmO8Y7YEKF2UFra2sJQtl9V/uFKKDvy+Wjh9zgTku6VRgT8YdPoD" +cookieconsentcss = "sha384-6iYDyQZuuNT7DcPJGXx241czdv2+GDGUcXRiqw1iXrjgYMTorSetxFP3JCMQMwnR" +cookieconsentjs = "sha384-PDjg2ZdS3khPzd53i18+7tzB32JVQfFMrTXYo21RqPgUmEVAPwIhxOUF/8sP79CS" diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 0047045..f8867aa 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -9,7 +9,7 @@ {{ block "title" . }}{{ .Site.Title }}{{ end }} {{ "" | safeHTML }} - + {{ if .RSSLink }} {{ "" | safeHTML }} diff --git a/layouts/partials/cookie-consent.html b/layouts/partials/cookie-consent.html index 46e3ba8..90343b3 100644 --- a/layouts/partials/cookie-consent.html +++ b/layouts/partials/cookie-consent.html @@ -1,5 +1,5 @@ - - + +