diff options
author | Bjørn Erik Pedersen <[email protected]> | 2018-07-18 19:58:39 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2018-07-19 14:32:43 +0200 |
commit | e25aa655f4227ac064be5fe770d517a80acd46b2 (patch) | |
tree | d5826566794ba8acba57fda155d56ba3d844fbad /hugolib/site_test.go | |
parent | 12679b408362a93a3c6159588d6291a3b7ed5548 (diff) | |
download | hugo-e25aa655f4227ac064be5fe770d517a80acd46b2.tar.gz hugo-e25aa655f4227ac064be5fe770d517a80acd46b2.zip |
Add configurable ref/relref error handling and notFoundURL
Two new settings:
* refLinksErrorLevel: ERROR (default) or WARNING. ERROR will fail the build.
* refLinksNotFoundURL: Used as a placeholder when page references cannot be found.
Fixes #4964
Diffstat (limited to 'hugolib/site_test.go')
-rw-r--r-- | hugolib/site_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hugolib/site_test.go b/hugolib/site_test.go index 202c01986..7787ea2a4 100644 --- a/hugolib/site_test.go +++ b/hugolib/site_test.go @@ -925,7 +925,7 @@ func TestRefLinking(t *testing.T) { {"level2/common.md", "", true, "/level2/common/"}, {"3-root.md", "", true, "/level2/level3/3-root/"}, } { - if out, err := site.Info.refLink(test.link, currentPage, test.relative, test.outputFormat); err != nil || out != test.expected { + if out, err := site.refLink(test.link, currentPage, test.relative, test.outputFormat); err != nil || out != test.expected { t.Errorf("[%d] Expected %s to resolve to (%s), got (%s) - error: %s", i, test.link, test.expected, out, err) } } |