# How to configure ref and relref using a config.yaml file?

**URL:** https://discourse.gohugo.io/t/how-to-configure-ref-and-relref-using-a-config-yaml-file/45358
**Category:** support
**Created:** [July 19, 2023, 7:12am UTC](https://discourse.gohugo.io/t/how-to-configure-ref-and-relref-using-a-config-yaml-file/45358 "2023-07-19T07:12:55Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![RedeyeFR](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/redeyefr/32/19896_2.png) [@RedeyeFR](https://discourse.gohugo.io/u/RedeyeFR)
#### Post date: [July 19, 2023, 7:12am UTC](https://discourse.gohugo.io/t/how-to-configure-ref-and-relref-using-a-config-yaml-file/45358/1 "2023-07-19T07:12:55Z")

</div>

Hi there, my website is up and running and have an auto-import from obsidian just like I wanted.

Here you can find my [config.yaml](https://github.com/mathisgauthey/mathisgauthey.github.io/blob/main/config.yaml), what I want to do is add a [ref configuration](https://gohugo.io/content-management/cross-references/#ref-and-relref-configuration) so that an empty link give just a warning in HUGO building and refers to 404.

My issue is that using these lines in my config.yaml doesn’t work :

```auto
refLinksErrorLevel (“WARNING”)
refLinksNotFoundURL: https://mathisgauthey.github.io/404

```

I get the following errors :

```auto
Error: command error: failed to load config: "/home/mathis/documents/mathisgauthey.github.io/config.yaml:8:1": failed to unmarshal YAML: yaml: line 8: could not find expected ':'

```

---

<div class="post-metadata">

### Author: ![RedeyeFR](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/redeyefr/32/19896_2.png) [@RedeyeFR](https://discourse.gohugo.io/u/RedeyeFR)
#### Post date: [July 19, 2023, 7:13am UTC](https://discourse.gohugo.io/t/how-to-configure-ref-and-relref-using-a-config-yaml-file/45358/2 "2023-07-19T07:13:33Z")

</div>

Stupid old me found out while writing so I figured I might as well post it. Solution :

```auto
refLinksErrorLevel: WARNING
refLinksNotFoundURL: https://mathisgauthey.github.io/404

```

---

<div class="post-metadata">

### Author: ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)
#### Post date: [July 21, 2023, 7:14am UTC](https://discourse.gohugo.io/t/how-to-configure-ref-and-relref-using-a-config-yaml-file/45358/3 "2023-07-21T07:14:30Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
