hugo/tpl
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
..
cast Fix error handling for the time func alias 2021-08-01 13:39:30 +02:00
collections Add some basic security policies with sensible defaults 2021-12-16 09:40:22 +01:00
compare Fix error handling for the time func alias 2021-08-01 13:39:30 +02:00
crypto Fix error handling for the time func alias 2021-08-01 13:39:30 +02:00
data Add some basic security policies with sensible defaults 2021-12-16 09:40:22 +01:00
debug Fix error handling for the time func alias 2021-08-01 13:39:30 +02:00
encoding Fix error handling for the time func alias 2021-08-01 13:39:30 +02:00
fmt Fix error handling for the time func alias 2021-08-01 13:39:30 +02:00
hugo Fix error handling for the time func alias 2021-08-01 13:39:30 +02:00
images Fix error handling for the time func alias 2021-08-01 13:39:30 +02:00
inflect Fix error handling for the time func alias 2021-08-01 13:39:30 +02:00
internal Add resources.GetRemote 2021-12-17 09:33:51 +01:00
js Fix error handling for the time func alias 2021-08-01 13:39:30 +02:00
lang Fix description of lang.FormatNumberCustom 2021-11-01 18:54:43 +01:00
math Fix error handling for the time func alias 2021-08-01 13:39:30 +02:00
openapi/openapi3 Fix error handling for the time func alias 2021-08-01 13:39:30 +02:00
os Add some basic security policies with sensible defaults 2021-12-16 09:40:22 +01:00
partials Allow for return partials with falsy arguments (#9298) 2021-12-17 08:35:21 +01:00
path tpl/path: Add path.Clean 2021-10-05 16:15:10 +02:00
reflect Fix error handling for the time func alias 2021-08-01 13:39:30 +02:00
resources Add resources.GetRemote 2021-12-17 09:33:51 +01:00
safe Fix error handling for the time func alias 2021-08-01 13:39:30 +02:00
site Fix error handling for the time func alias 2021-08-01 13:39:30 +02:00
strings Fix error handling for the time func alias 2021-08-01 13:39:30 +02:00
templates Fix error handling for the time func alias 2021-08-01 13:39:30 +02:00
time tpl/time: Use configured location when date passed to Format is string 2021-10-30 16:09:38 +02:00
tplimpl Allow for return partials with falsy arguments (#9298) 2021-12-17 08:35:21 +01:00
transform Add some basic security policies with sensible defaults 2021-12-16 09:40:22 +01:00
urls Fix error handling for the time func alias 2021-08-01 13:39:30 +02:00
template.go all: Fix minor typos 2020-12-16 12:11:32 +01:00
template_info.go Add render template hooks for links and images 2019-12-18 11:44:40 +01:00
template_test.go Create lightweight forks of text/template and html/template 2019-12-12 09:59:34 +01:00