hugo/tpl/internal
Bjørn Erik Pedersen 22ef5da20d
Add resources.GetRemote
In Hugo 0.89 we added remote support to `resources.Get`.

In hindsight that was not a great idea, as a poll from many Hugo users showed. See Issue #9285 for more details.

After this commit `resources.Get` only supports local resource lookups. If you want to support both, you need to use a construct similar to:

Also improve some option case handling.

```
{{ resource := "" }}
{{ if (urls.Parse $url).IsAbs }}
{{ $resource = resources.GetRemote $url }}
{{ else }}
{{ $resource = resources.Get $url }}
{{ end }}
```

Fixes #9285
Fixes #9296
2021-12-17 09:33:51 +01:00
..
go_templates Add resources.GetRemote 2021-12-17 09:33:51 +01:00
resourcehelpers Add proper Media Type handling in js.Build 2020-07-13 10:56:23 +02:00
templatefuncRegistry_test.go tests: Convert from testify to quicktest 2019-08-12 13:26:32 +02:00
templatefuncsRegistry.go Fix error handling for the time func alias 2021-08-01 13:39:30 +02:00