From 6ffa8823495fcda3580748b2d1c84890af8914b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Thu, 19 Jul 2018 17:17:35 +0200 Subject: [PATCH] hugolib: Improve error handling in refLink --- hugolib/site.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hugolib/site.go b/hugolib/site.go index b460a0f81..dcb9b1d8c 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 {