# Links in index.md not works

**URL:** <https://discourse.gohugo.io/t/links-in-index-md-not-works/43840>\
**Category:** support\
**Created:** [April 10, 2023, 2:55pm UTC](https://discourse.gohugo.io/t/links-in-index-md-not-works/43840 "2023-04-10T14:55:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nedjma\_Media](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/nedjma_media/32/18929_2.png) [@Nedjma\_Media](https://discourse.gohugo.io/u/Nedjma_Media)\
**Post date:** [April 10, 2023, 2:55pm UTC](https://discourse.gohugo.io/t/links-in-index-md-not-works/43840/1 "2023-04-10T14:55:27Z")

</div>

Hi

I created index.md in a folder and next to this file are articles which are the chapters of a book which are titles in index.md

The problem is that the links (titles) in this file index.md do not work but for \_index.md they work well

I want to use index.md to not show the list of items included in the folder

only the titles and their links

I use : [chapter1] (the-chapter-1 “chapter1”) to show the links

do you have a solution to make the links work?

---

<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:** [April 10, 2023, 3:39pm UTC](https://discourse.gohugo.io/t/links-in-index-md-not-works/43840/2 "2023-04-10T15:39:57Z")

</div>

```plaintext
content/
└── books/
    └── book-1/
        ├── chapter-1.md <-- page resource (not a page)
        ├── chapter-2.md <-- page resource (not a page)
        └── index.md <-- leaf bundle

```

The presence of an `index.md` file makes the directory a leaf bundle. The other files in the directory are page resources, not pages.

[https://gohugo.io/content-management/page-bundles/](https://gohugo.io/content-management/page-bundles/)

If you want `chapter-1.md ` to be a page, rename `index.md` to `_index.md`. The presence of an `_index.md` file makes the directory a branch bundle.

---

<div class="post-metadata">

**Author:** ![Nedjma\_Media](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/nedjma_media/32/18929_2.png) [@Nedjma\_Media](https://discourse.gohugo.io/u/Nedjma_Media)\
**Post date:** [April 10, 2023, 7:51pm UTC](https://discourse.gohugo.io/t/links-in-index-md-not-works/43840/3 "2023-04-10T19:51:41Z")

</div>

When i rename index.md to \_index.md  
a list of articles ( chapters ) are displayed I want to display only the content of \_index.md without overwriting the list file of articles in the parent folder ( books ) is there a solution?

---

<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:** [April 10, 2023, 8:07pm UTC](https://discourse.gohugo.io/t/links-in-index-md-not-works/43840/4 "2023-04-10T20:07:53Z")

</div>

I do not understand your question.

---

<div class="post-metadata">

**Author:** ![will](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/will/32/18403_2.png) [@will](https://discourse.gohugo.io/u/will)\
**Post date:** [April 11, 2023, 5:49am UTC](https://discourse.gohugo.io/t/links-in-index-md-not-works/43840/5 "2023-04-11T05:49:18Z")

</div>

You have to change the layout. By default, it’s using the list layout. Either change layouts/\_default/list.html, or layouts/mybook/list.html, or set `layout: "foo"` in \_index.md and then define layouts/\_default/foo.html.
