hugo version)?$ hugo version Hugo Static Site Generator v0.61.0/extended darwin/amd64 BuildDate: unknown
Yes
Following the example here, I have the following template in layouts/_default/baseof.html:
{{ if .Params.katex }}
{{ resources.Get "css/katex.css" | minify | fingerprint | .Page.Scratch.SetInMap "css" "katex" }}
{{ end }}
which results in the following build error:
ERROR 2019/12/19 22:38:57 Failed to render pages: render of "page" failed: executing "_default/single.html" at <minify>: wrong type for value; expected resources.ResourceTransformer; got resource.Resource
Searching for ResourceTransformer comes up with nothing on the Hugo website or on Google.
So the problem was that I was keeping my CSS and JS files under the static directory (as directed here) while the resources.Get functions look under assets (as noted here).
I'll close the issue since this is just a case of user error; however, this seems like a gotcha for newbies (like me) and it might be worth updating the documentation (maybe adding a footnote to the static section saying that there is a difference between static and assets?)
Most helpful comment
So the problem was that I was keeping my CSS and JS files under the
staticdirectory (as directed here) while theresources.Getfunctions look underassets(as noted here).I'll close the issue since this is just a case of user error; however, this seems like a gotcha for newbies (like me) and it might be worth updating the documentation (maybe adding a footnote to the static section saying that there is a difference between
staticandassets?)