aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl/resources
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2024-05-17 17:06:47 +0200
committerBjørn Erik Pedersen <[email protected]>2024-06-04 16:07:39 +0200
commit447108fed2842e264897659856e9fd9cdc32ca23 (patch)
tree53687693e04496919dd84266cc1edc16746101b0 /tpl/resources
parentc71e24af5172e230baa5f7dfa2078721cda38df4 (diff)
downloadhugo-447108fed2842e264897659856e9fd9cdc32ca23.tar.gz
hugo-447108fed2842e264897659856e9fd9cdc32ca23.zip
Add a HTTP cache for remote resources.
Fixes #12502 Closes #11891
Diffstat (limited to 'tpl/resources')
-rw-r--r--tpl/resources/resources.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/tpl/resources/resources.go b/tpl/resources/resources.go
index 04af756ef..34b4464be 100644
--- a/tpl/resources/resources.go
+++ b/tpl/resources/resources.go
@@ -369,7 +369,7 @@ func (ns *Namespace) ToCSS(args ...any) (resource.Resource, error) {
}
if m != nil {
- if t, found := maps.LookupEqualFold(m, "transpiler"); found {
+ if t, _, found := maps.LookupEqualFold(m, "transpiler"); found {
switch t {
case transpilerDart, transpilerLibSass:
transpiler = cast.ToString(t)
@@ -440,7 +440,6 @@ func (ns *Namespace) Babel(args ...any) (resource.Resource, error) {
var options babel.Options
if m != nil {
options, err = babel.DecodeOptions(m)
-
if err != nil {
return nil, err
}