# \[Solved\] Confusion about ref / relref

**URL:** <https://discourse.gohugo.io/t/solved-confusion-about-ref-relref/5562>\
**Category:** support\
**Created:** [February 22, 2017, 11:08pm UTC](https://discourse.gohugo.io/t/solved-confusion-about-ref-relref/5562 "2017-02-22T23:08:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![le-cds](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@le-cds](https://discourse.gohugo.io/u/le-cds)\
**Post date:** [February 22, 2017, 11:08pm UTC](https://discourse.gohugo.io/t/solved-confusion-about-ref-relref/5562/1 "2017-02-22T23:08:54Z")

</div>

Hi there,

my first Hugo site is coming along pretty nicely, but I seem to be quite confused about how to use ref / relref. This is part of what my `content` folder looks like:

```
content
   documentation
       _index.md
       AlgorithmDevelopers.md
       AlgorithmDevelopers
           AlgorithmDebugging.md

```

In the `_index.md` file, I have the following link:

```
[algorithm developers]({{< ref "documentation/AlgorithmDevelopers.md" >}})

```

This, however, results in the following error message being thrown:

```
ERROR: 2017/02/23 00:06:20 template_funcs.go:1398: No page found with path or logical name "documentation/AlgorithmDevelopers.md".

```

As I understand the documentation, the argument to ref / relref can be a path to a markdown file relative to the `content/` folder, which I believe is the case here. Am I missing something obvious?

I did think about whether markdown files combined with folders of the same name might be a problem. However, linking to a file that doesn’t have a sibling folder with the same base name gives me the same problem.

---

<div class="post-metadata">

**Author:** ![le-cds](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@le-cds](https://discourse.gohugo.io/u/le-cds)\
**Post date:** [February 23, 2017, 8:50am UTC](https://discourse.gohugo.io/t/solved-confusion-about-ref-relref/5562/2 "2017-02-23T08:50:05Z")

</div>

It seems that this works perfectly fine when I actually build the site. The problems only pertain to starting Hugo in the live server mode. In that mode, I also have problems with images that are placed in the same directory as the files that use them, which works fine in the export.

---

<div class="post-metadata">

**Author:** ![le-cds](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@le-cds](https://discourse.gohugo.io/u/le-cds)\
**Post date:** [February 23, 2017, 9:26am UTC](https://discourse.gohugo.io/t/solved-confusion-about-ref-relref/5562/3 "2017-02-23T09:26:21Z")

</div>

Turns out the problem seems to have been my baseURL, which looked something like this:

```
http://my.domain.com/folder/

```

The folder messed up everything. I stumbled upon the `canonifyURLs` setting, which, set to `true`, seems to have solved everything.

---

<div class="post-metadata">

**Author:** ![lws](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/lws/32/1825_2.png) [@lws](https://discourse.gohugo.io/u/lws)\
**Post date:** [February 23, 2017, 3:01pm UTC](https://discourse.gohugo.io/t/solved-confusion-about-ref-relref/5562/4 "2017-02-23T15:01:08Z")

</div>

See also [https://discuss.gohugo.io/t/canonifyurls-relativeurls-interaction/5448](https://discuss.gohugo.io/t/canonifyurls-relativeurls-interaction/5448) for more on this topic.
