From e7e4b1f103a0b4208c2b63e6e0e20ea75471c062 Mon Sep 17 00:00:00 2001 From: Will Faught Date: Sat, 7 Jan 2023 08:38:39 -0800 Subject: [PATCH] Add remote param to script.html --- layouts/partials/paige/script.html | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/layouts/partials/paige/script.html b/layouts/partials/paige/script.html index daa01c2a..ec375bf9 100644 --- a/layouts/partials/paige/script.html +++ b/layouts/partials/paige/script.html @@ -4,14 +4,18 @@ {{ $onload := .onload | safeJS }} {{ $page := .page }} {{ $referrerpolicy := .referrerpolicy | default "no-referrer" }} +{{ $remote := .remote }} {{ $src := .src }} -{{ $resource := (partial `paige/func-resource.html` (dict - "page" $page - "url" $src -)) | minify | fingerprint }} - -{{ $integrity = $resource.Data.Integrity }} -{{ $src = $resource.RelPermalink }} +{{ if $remote }} + {{ $src = relLangURL $src }} +{{ else }} + {{ $resource := (partial "paige/func-resource.html" (dict + "page" $page + "url" $src + )) | minify | fingerprint }} + {{ $integrity = $resource.Data.Integrity }} + {{ $src = $resource.RelPermalink }} +{{ end }}