Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not very useful error message: <minify>: wrong type for value; expected resources.ResourceTransformer; got resource.Resource #9296

Closed
bep opened this issue Dec 16, 2021 · 1 comment
Assignees
Labels
Milestone

Comments

@bep
Copy link
Member

bep commented Dec 16, 2021

No description provided.

@bep bep added the Bug label Dec 16, 2021
@bep bep added this to the v0.91.0 milestone Dec 16, 2021
@bep bep self-assigned this Dec 16, 2021
bep added a commit to bep/hugo that referenced this issue Dec 16, 2021
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 gohugoio#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 gohugoio#9285
Fixes gohugoio#9296
@bep bep closed this as completed in 22ef5da Dec 17, 2021
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant