# Strange behavior with \_index.md

**URL:** <https://discourse.gohugo.io/t/strange-behavior-with-index-md/27693>\
**Category:** support\
**Created:** [August 20, 2020, 1:22am UTC](https://discourse.gohugo.io/t/strange-behavior-with-index-md/27693 "2020-08-20T01:22:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jelani](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jelani/32/12182_2.png) [@Jelani](https://discourse.gohugo.io/u/Jelani)\
**Post date:** [August 20, 2020, 1:22am UTC](https://discourse.gohugo.io/t/strange-behavior-with-index-md/27693/1 "2020-08-20T01:22:13Z")

</div>

I’m using Hugo for my course website. I did so for an earlier version of the course in Fall 2017 and it worked without any problems. Then for the Fall 2020 version, in content/ I copied over what was in the fall17 directory to a new fall20 directory and made some minor changes the text. Now I get some weird behavior (compare [https://www.sketchingbigdata.org/fall20/](https://www.sketchingbigdata.org/fall20/) with [https://www.sketchingbigdata.org/fall17/](https://www.sketchingbigdata.org/fall17/)):

- The navbar is all wrong; it should be like the subpage syllabus on fall20/ (sorry but the discussion forum won’t let me put \> 2 links in this post, else I would have written the link in full!)
- “Sketching Algorithms” for some reason appears twice at the top.
- There should be no text under “linear algebra”, but other text is randomly showing up (seems to be text from the syllabus and project subpages of fall20/).

What I thought should display at fall20/ is what’s in content/fall20/\_index.md. That file is very similar to content/fall17/\_index.md, which seems to be working just fine. Any ideas what might be causing the fall20 issues?

Some more info:

- Here’s a copy of \_index.md

- content/ has in it fall17/ fall20/ and home/ subdirectories. Each of fall17/ and fall20/ have their own files hmwk.md, \_index.md, lec.md, project.md, staff.md, and syllabus.md. If I go to any of the subpages of fall20, they seem to work, e.g. fall20/hmwk. But going to the index file is giving this weird behavior, though again, fall17/ works perfectly though.

I’m happy to answer any further questions that might help diagnose this. Thank you!

EDIT: I thought maybe the problem was I should be using index.md and not \_index.md, so I made that change. It now works locally when I do `hugo server`, but it still is rendering weirdly when I deploy online.

---

<div class="post-metadata">

**Author:** ![pointyfar](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/pointyfar/32/5797_2.png) [@pointyfar](https://discourse.gohugo.io/u/pointyfar)\
**Post date:** [August 20, 2020, 2:50am UTC](https://discourse.gohugo.io/t/strange-behavior-with-index-md/27693/2 "2020-08-20T02:50:22Z")

</div>

There’s been quite a few changes since 2017.

- Which Hugo version and theme version were you on vs which one currently?

- It is probably around the `.Pages` variable: [https://gohugo.io/variables/site/#site-pages](https://gohugo.io/variables/site/#site-pages)

- It would be easier to help if we can see the source in a repo

---

<div class="post-metadata">

**Author:** ![Jelani](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jelani/32/12182_2.png) [@Jelani](https://discourse.gohugo.io/u/Jelani)\
**Post date:** [August 20, 2020, 3:23am UTC](https://discourse.gohugo.io/t/strange-behavior-with-index-md/27693/3 "2020-08-20T03:23:18Z")

</div>

Thanks for your response @pointyfar.

- I’m now using hugo v0.40.1. I don’t know what version I was using in 2017.
- I looked at the link you posted about .Pages, but I wasn’t sure how to apply it.
- The source was in a private repo. I’ve now copied it to a public repo: [https://github.com/minilek/forum\_help](https://github.com/minilek/forum_help)

EDIT: That hugo version is what I have locally. I just noticed that netlify, which I’m using for deployment, is using Hugo 0.26. Also, I’m using the Academic theme.

---

<div class="post-metadata">

**Author:** ![Jelani](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jelani/32/12182_2.png) [@Jelani](https://discourse.gohugo.io/u/Jelani)\
**Post date:** [August 20, 2020, 3:39am UTC](https://discourse.gohugo.io/t/strange-behavior-with-index-md/27693/4 "2020-08-20T03:39:19Z")

</div>

OK sorry for wasting everyone’s time. After looking through the repo more carefully I realized I must have come across the same issue in Fall 2017 as well, and hack-fixed it by creating a new layouts/fall17/list.html. I copied that into layouts/fall20/list.html and now it works.

---

<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:** [August 22, 2020, 3:39am UTC](https://discourse.gohugo.io/t/strange-behavior-with-index-md/27693/5 "2020-08-22T03:39:23Z")

</div>

Closed on August 22, 2020, 3:39am UTC

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