From d3235cb0cbe6d96cd6516fc2b2bc904e6d2d23ed Mon Sep 17 00:00:00 2001 From: Will Faught Date: Mon, 3 Mar 2025 17:43:18 -0800 Subject: [PATCH] Move remote resources to type dir --- layouts/partials/paige/func-resource.html | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/layouts/partials/paige/func-resource.html b/layouts/partials/paige/func-resource.html index 3420ffbf..8fa0d251 100644 --- a/layouts/partials/paige/func-resource.html +++ b/layouts/partials/paige/func-resource.html @@ -33,7 +33,15 @@ {{ end }} {{ end }} -{{ if not $result }} +{{ if $result }} + {{ with urls.Parse $url }} + {{ if .Scheme }} + {{ $path := print ($result.MediaType.SubType) "/paige" $result.RelPermalink }} + + {{ $result = resources.Copy $path $result }} + {{ end }} + {{ end }} +{{ else }} {{ errorf "layouts/partials/paige/func-resource.html: cannot find resource %q" $url }} {{ end }}