I remember this being either discussed somewhere or even being implemented somehow: I would like to throw some kind of readable error with my theme. Let’s assume I have a search script included (Algolia) that requires an enable config parameter to enable it and then some configuration parameters (index name, api key) to work. If the user enables it, but forgets to add configuration for the index I would like to break the compilation with a readable note what is missing instead of Hugo’s “something somewhere went wrong”. Is it possible to do some kind of error message setup before trying to do something?
I think I can do a with configvar do something else show error end thingy, but this specific setup requires a javascript executed as template and people probably would not see anything printed there…
Also I would want it to show up on CLI. If possible.
wouldn’t it be nice to have a way to kill generation with a readable error message?