mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-23 21:53:09 +02:00
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
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user