HUGO

[SOLVED] Function "warnf" not defined

I was deploying on netlify with hugo command and getting
“Failed during stage ‘building site’: Build script returned non-zero exit code: 2” due to 'function “warnf” not defined.

Full error message:

Error: "/opt/build/repo/themes/PaperMod/layouts/shortcodes/collapse.html:4:1": parse failed: template: shortcodes/collapse.html:4: function "warnf" not defined

It is happening in a shortcode file. The line goes:

{{ warnf "missing value for param 'summary': %s" .Position     }} 

Any idea why?

SOLVED:
I needed to add a netlify.toml file. The issue occured because I went ahead with default settings. I copied the example toml file on Hugo Dos and it worked!

1 Like

This topic was automatically closed after 19 hours. New replies are no longer allowed.