# Development Environment - Reference Links Break site

**URL:** <https://discourse.gohugo.io/t/development-environment-reference-links-break-site/43087>\
**Category:** support\
**Tags:** pagination\
**Created:** [February 21, 2023, 5:45pm UTC](https://discourse.gohugo.io/t/development-environment-reference-links-break-site/43087 "2023-02-21T17:45:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![NewtonFist](https://avatars.discourse-cdn.com/v4/letter/n/b5ac83/32.png) [@NewtonFist](https://discourse.gohugo.io/u/NewtonFist)\
**Post date:** [February 21, 2023, 5:45pm UTC](https://discourse.gohugo.io/t/development-environment-reference-links-break-site/43087/1 "2023-02-21T17:45:31Z")

</div>

Hello, this one has had me stumped for a while and I’m not sure what I am doing wrong.

I’ve tried to generate a hugo site twice with the current version, `hugo v0.110.0+extended linux/amd64`, but cannot get reference links to work while developing my blog. It has some pagination to go into the different topics I cover.

I have a dir for each topic within the contents dir.  
Within each dir is an unique index.md file - this is where I place the links to each document within the topic’s dir.

I first generate a new document with hugo using hugo new /content/topic/first\_post.md

I type up some text and set the draft tag to false.

I update the index.md file within the dir to include a link to the new document, adding line:  
[first post]({{\< ref “/topic/first\_post.md” \> }})

This breaks the site immediately and produces the REF\_NOT\_FOUND error.

It does not matter if I use relref or ref.

It does not matter if I build a new hugo site - the bug persists.

I have confirmed permissions to the files index.md and first\_post.md are consistent.

The link works when I drop the markdown document and just provide a path - of course this never lets me open the intended document.

I cannot seem to find where/how I am doing this one wrong.

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [February 21, 2023, 5:53pm UTC](https://discourse.gohugo.io/t/development-environment-reference-links-break-site/43087/2 "2023-02-21T17:53:23Z")

</div>

> [@NewtonFist](#):
>
> I have a dir for each topic within the contents dir.  
> Within each dir is an unique index.md file - this is where I place the links to each document within the topic’s dir.

It sounds like you have this file structure:

```plaintext
content/
└── topic-1/
    ├── document-1.md
    ├── document-2.md
    └── index.md

```

Is that correct?

---

<div class="post-metadata">

**Author:** ![NewtonFist](https://avatars.discourse-cdn.com/v4/letter/n/b5ac83/32.png) [@NewtonFist](https://discourse.gohugo.io/u/NewtonFist)\
**Post date:** [February 21, 2023, 5:53pm UTC](https://discourse.gohugo.io/t/development-environment-reference-links-break-site/43087/3 "2023-02-21T17:53:52Z")

</div>

Yup, that’s exactly what I am going for.

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [February 21, 2023, 5:54pm UTC](https://discourse.gohugo.io/t/development-environment-reference-links-break-site/43087/4 "2023-02-21T17:54:18Z")

</div>

You need to rename “index.md” to “\_index.md”.

---

<div class="post-metadata">

**Author:** ![NewtonFist](https://avatars.discourse-cdn.com/v4/letter/n/b5ac83/32.png) [@NewtonFist](https://discourse.gohugo.io/u/NewtonFist)\
**Post date:** [February 21, 2023, 5:58pm UTC](https://discourse.gohugo.io/t/development-environment-reference-links-break-site/43087/5 "2023-02-21T17:58:44Z")

</div>

That solved it, thanks.

---

<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:** [February 23, 2023, 5:59pm UTC](https://discourse.gohugo.io/t/development-environment-reference-links-break-site/43087/6 "2023-02-23T17:59:19Z")

</div>

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