From d480bf388918944d322a499f3dbbd51f7e977b82 Mon Sep 17 00:00:00 2001 From: Ian Lewis Date: Thu, 30 May 2019 04:20:12 -0400 Subject: Serve all javascript from gvisor.dev For security & privacy reasons, serve javascript from gvisor.dev instead of using external CDNs. --- layouts/partials/scripts.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 layouts/partials/scripts.html (limited to 'layouts/partials/scripts.html') diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html new file mode 100644 index 000000000..b6f9696d3 --- /dev/null +++ b/layouts/partials/scripts.html @@ -0,0 +1,12 @@ + + +{{ $jsBase := resources.Get "js/base.js" }} +{{ $jsSearch := resources.Get "js/search.js" | resources.ExecuteAsTemplate "js/search.js" .Site.Home }} +{{ $js := (slice $jsBase $jsSearch) | resources.Concat "js/main.js" }} +{{ if .Site.IsServer }} + +{{ else }} +{{ $js := $js | minify | fingerprint }} + +{{ end }} +{{ partial "hooks/body-end.html" . }} -- cgit v1.2.3