When I have bugs or issues, I turn to GenAI tools nowadays. However they couldn’t one-shot producing a solution yet.

I tried a prompt shared by Ted Werbl and it turned out to be very useful.

Prompt response from Codeium

This is the full prompt.

What happened?

I use Hugo for this site. I got this error when I tried to add a cover to a post.

ERROR couldn’t find resource for src: static/images/mass-delete-posts-in-meta-business-suite.png

The tool recommended adding a snippet of code for debugging:

{{- errorf “couldn’t find resource for src: %s. Current page path: %s. Available resources: %+v” $path .Page.Path .Page.Resources -}}

I was able to identify the directory that I should store the image quickly.