hugo/resources
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
..
images Improve handling of remote image/jpeg resources (#9278) 2021-12-13 08:55:15 +01:00
internal
jsconfig
page Allow user to handle/ignore errors in resources.Get 2021-12-10 11:10:41 +01:00
postpub
resource Allow user to handle/ignore errors in resources.Get 2021-12-10 11:10:41 +01:00
resource_factories Add resources.GetRemote 2021-12-17 09:33:51 +01:00
resource_transformers Add some basic security policies with sensible defaults 2021-12-16 09:40:22 +01:00
testdata Add custom font support to images.Text 2021-12-07 16:53:02 +01:00
errorResource.go Allow user to handle/ignore errors in resources.Get 2021-12-10 11:10:41 +01:00
image.go
image_cache.go
image_extended_test.go
image_test.go Add custom font support to images.Text 2021-12-07 16:53:02 +01:00
post_publish.go
resource.go Allow user to handle/ignore errors in resources.Get 2021-12-10 11:10:41 +01:00
resource_cache.go
resource_cache_test.go
resource_metadata.go
resource_metadata_test.go
resource_spec.go Add some basic security policies with sensible defaults 2021-12-16 09:40:22 +01:00
resource_test.go
testhelpers_test.go Add some basic security policies with sensible defaults 2021-12-16 09:40:22 +01:00
transform.go Allow user to handle/ignore errors in resources.Get 2021-12-10 11:10:41 +01:00
transform_test.go