# Ignore link errors

**URL:** <https://discourse.gohugo.io/t/ignore-link-errors/8670>\
**Category:** support\
**Created:** [October 4, 2017, 7:18am UTC](https://discourse.gohugo.io/t/ignore-link-errors/8670 "2017-10-04T07:18:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sharonl](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/sharonl/32/3236_2.png) [@sharonl](https://discourse.gohugo.io/u/sharonl)\
**Post date:** [October 4, 2017, 7:18am UTC](https://discourse.gohugo.io/t/ignore-link-errors/8670/1 "2017-10-04T07:18:41Z")

</div>

Is it possible to ignore specific types of error when running hugo? Specifically, I want to temporarily ignore cross-reference link errors when the link target does not exist.

As a general rule, I don’t think that unresolved links should be considered critical errors that break the build, which currently seems to be the case.  
Currently the only way I have around this is to use standard Markdown or HTML code to create the cross-reference links, instead of using the Hugo `ref` or `relref` shortcodes, which produce the errors.

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [October 4, 2017, 7:49am UTC](https://discourse.gohugo.io/t/ignore-link-errors/8670/2 "2017-10-04T07:49:48Z")

</div>

No. You could ignore the exit code, of course.

---

<div class="post-metadata">

**Author:** ![sharonl](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/sharonl/32/3236_2.png) [@sharonl](https://discourse.gohugo.io/u/sharonl)\
**Post date:** [October 4, 2017, 7:52am UTC](https://discourse.gohugo.io/t/ignore-link-errors/8670/3 "2017-10-04T07:52:34Z")

</div>

I tried that, but the problem is that hugo seems to stop the build processing when it cannot find the link target of a `ref` or `relref` shortcode, and the build output doesn’t contain all the necessary files.

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [October 4, 2017, 7:53am UTC](https://discourse.gohugo.io/t/ignore-link-errors/8670/4 "2017-10-04T07:53:12Z")

</div>

OK, that doesn’t sound right. Could you file a GitHub issue for that?

---

<div class="post-metadata">

**Author:** ![sharonl](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/sharonl/32/3236_2.png) [@sharonl](https://discourse.gohugo.io/u/sharonl)\
**Post date:** [October 4, 2017, 7:55am UTC](https://discourse.gohugo.io/t/ignore-link-errors/8670/5 "2017-10-04T07:55:17Z")

</div>

Yes. I’ll try to reproduce with a concise clean test to verify, and then I’ll file an issue. 10x.

---

<div class="post-metadata">

**Author:** ![sharonl](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/sharonl/32/3236_2.png) [@sharonl](https://discourse.gohugo.io/u/sharonl)\
**Post date:** [October 4, 2017, 12:07pm UTC](https://discourse.gohugo.io/t/ignore-link-errors/8670/6 "2017-10-04T12:07:59Z")

</div>

OK, so good news, it turns out that the hugo build does _not_ break when `ref` or `relref` references a non-existing site page; I previously tested several issues together and something must have muddled the test.

---

<div class="post-metadata">

**Author:** ![sharonl](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/sharonl/32/3236_2.png) [@sharonl](https://discourse.gohugo.io/u/sharonl)\
**Post date:** [October 4, 2017, 12:08pm UTC](https://discourse.gohugo.io/t/ignore-link-errors/8670/7 "2017-10-04T12:08:48Z")

</div>

Is there documentation of the hugo error codes?
