Hi. When I add refLinksErrorLevel = "WARNING"
to my config.toml file (per the Ref and RelRef Configuration documentation for this new Hugo v0.45 option), it indeed eliminates the errors for unresolved relref
link targets, but I don’t see any warnings for unresolved references, as I would expect? (The relref
call doesn’t render any output, which is OK.) The same is true for the ref
shortcode.
Can you share your site’s project? I don’t expect to see any warnings in my site, so I can’t test this.
You may find this odd (I kind of agree, but this was done before my time), but you need to run with hugo -v
to see WARNINGs.
Thanks @bep. When using the --verbose
Hugo CLI option I see REF_NOT_FOUND
warnings for unresolved relref
or ref
calls. Indeed, I find this odd. It would be nice if Hugo could support different verbosity levels.
(@maiki My site doesn’t have unresolved references either. I added local shortcode calls for non-existing link targets just to check the refLinksErrorLevel
configuration.)
@bep Is there a way to identify the current verbosity level from a custom template or shortcode?
No…
The suggestion stands: please share your project code when seeking help. In this instance you might provide the shortcode to create the errors.
From your perspective you’ve hit a wall in your project, from my perspective you have a complex site that I can’t reproduce easily. That is why we ask.
a. We have a proprietary site that I can’t share in its entirety.
b. In this instance, there was no point in sharing our site, as the problem wasn’t related to any specific implementation. It was a general question of the expected and actual behavior when using the refLinksErrorLevel = "WARNING"
configuration, which bep was easily able to answer.