Developer preference: Do you prefer build error or rendered page w/ warning on page?

I’m curious what everyone prefers…

Let’s say I have a frontmatter key for a header image that gets use in the single page, home page as a list, and a widget.

If you or the content creator gives the wrong path to the image, would you rather:

  1. The Hugo build fails and returns an error in the console (or browser if using the server)??


  1. The Hugo build successfully renders the page but in place of the image is some bold red text that says “COULD NOT FIND IMAGE: path” where path would read the value of the frontmatter key.

I’m not sure which would be best and I would love some opinions and why.

IMO, errors shouldn’t propagate into the rendered site. Either fail the build with an error, or if you think it’s not an error that should break the build, raise a build warning.


This is the best road for having forgotten errors spread all around the site.
Not a good idea IMO

1 Like