From: Bjørn Erik Pedersen Date: Thu, 19 Jul 2018 15:17:35 +0000 (+0200) Subject: hugolib: Improve error handling in refLink X-Git-Tag: v0.45~17 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=6ffa8823495fcda3580748b2d1c84890af8914b9;p=brevno-suite%2Fhugo hugolib: Improve error handling in refLink --- diff --git a/hugolib/site.go b/hugolib/site.go index b460a0f8..dcb9b1d8 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -514,7 +514,8 @@ func (s *siteRefLinker) refLink(ref string, page *Page, relative bool, outputFor target, err := s.s.getPageNew(page, refURL.Path) if err != nil { - return "", err + s.logNotFound(refURL.Path, err.Error(), page) + return s.notFoundURL, nil } if target == nil {