hugo/hugolib
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
..
assets/images
filesystems
paths
testdata Add some basic security policies with sensible defaults 2021-12-16 09:40:22 +01:00
testsite
404_test.go
alias.go
alias_test.go
breaking_changes_test.go
cascade_test.go
case_insensitive_test.go
collections.go
collections_test.go
config.go Add some basic security policies with sensible defaults 2021-12-16 09:40:22 +01:00
config_test.go
configdir_test.go
content_factory.go
content_factory_test.go
content_map.go
content_map_page.go
content_map_test.go
content_render_hooks_test.go
datafiles_test.go
dates_test.go
disableKinds_test.go
embedded_shortcodes_test.go
embedded_templates_test.go Remove empty href element from pagination template 2021-12-02 09:14:30 +01:00
fileInfo.go
fileInfo_test.go
gitinfo.go
hugo_modules_test.go Validate private use language tags 2021-12-02 16:30:53 +01:00
hugo_sites.go
hugo_sites_build.go
hugo_sites_build_errors_test.go
hugo_sites_build_test.go
hugo_sites_multihost_test.go
hugo_sites_rebuild_test.go
hugo_smoke_test.go
image_test.go
js_test.go deps: Upgrade github.com/evanw/esbuild v0.14.2 => v0.14.5 2021-12-17 08:26:45 +01:00
language_content_dir_test.go
language_test.go
menu_test.go
minify_publisher_test.go
mount_filters_test.go
multilingual.go
openapi_test.go
page.go Allow user to handle/ignore errors in resources.Get 2021-12-10 11:10:41 +01:00
page__common.go
page__content.go
page__data.go
page__menus.go
page__meta.go
page__new.go
page__output.go
page__paginator.go
page__paths.go
page__per_output.go
page__position.go
page__ref.go
page__tree.go
page_kinds.go
page_permalink_test.go
page_test.go Add some basic security policies with sensible defaults 2021-12-16 09:40:22 +01:00
page_unwrap.go
page_unwrap_test.go
pagebundler_test.go
pagecollections.go
pagecollections_test.go
pages_capture.go
pages_capture_test.go
pages_language_merge_test.go
pages_process.go
pages_test.go
paginator_test.go
permalinker.go
prune_resources.go
resource_chain_babel_test.go Add some basic security policies with sensible defaults 2021-12-16 09:40:22 +01:00
resource_chain_test.go Add resources.GetRemote 2021-12-17 09:33:51 +01:00
robotstxt_test.go
rss_test.go
securitypolicies_test.go Add resources.GetRemote 2021-12-17 09:33:51 +01:00
shortcode.go Add some basic security policies with sensible defaults 2021-12-16 09:40:22 +01:00
shortcode_page.go
shortcode_test.go Add some basic security policies with sensible defaults 2021-12-16 09:40:22 +01:00
site.go Add some basic security policies with sensible defaults 2021-12-16 09:40:22 +01:00
site_benchmark_new_test.go
site_output.go
site_output_test.go
site_render.go
site_sections.go
site_sections_test.go
site_stats_test.go
site_test.go
site_url_test.go
siteJSONEncode_test.go
sitemap_test.go
taxonomy.go
taxonomy_test.go
template_test.go Allow for return partials with falsy arguments (#9298) 2021-12-17 08:35:21 +01:00
testhelpers_test.go Add some basic security policies with sensible defaults 2021-12-16 09:40:22 +01:00
translations.go