1

error example

file structure I'm using

I am using the content organization guidelines described by the hugo website and it seems to not work whenever I run hugo server -D. any suggestions as to how I could get it to work?

this is the structure offered by the hugo docs just in case:

.
└── content
    └── about
    |   └── index.md  // <- https://example.com/about/
    ├── posts
    |   ├── firstpost.md   // <- https://example.com/posts/firstpost/
    |   ├── happy
    |   |   └── ness.md  // <- https://example.com/posts/happy/ness/
    |   └── secondpost.md  // <- https://example.com/posts/secondpost/
    └── quote
        ├── first.md       // <- https://example.com/quote/first/
        └── second.md      // <- https://example.com/quote/sec
m00nsh1n3
  • 11
  • 3

1 Answers1

1

Do you know the difference between index.md and _index.md? You must use the latter in this case.

https://discourse.gohugo.io/t/what-is-the-difference-between-index-md-and-index-md/10330

Mr. Hugo
  • 11,887
  • 3
  • 42
  • 60
  • Thanks for the recommendation, but it still doesn't work, I've found out that for some reason the other pages will only render if I modify the file while the server is running. It still gives me an error if I don't refresh. – m00nsh1n3 Sep 02 '22 at 08:10
  • That is a glitch... it is not working because it interprets the files as resources instead of pages. This has to do with directories being Sections or not. – Mr. Hugo Sep 02 '22 at 09:49
  • When I deploy it it doesn't seem to work either. Any tips for that? I'm sorry I'm very new to hugo so I'm still not well versed in how it works – m00nsh1n3 Sep 02 '22 at 12:44
  • Is there any way to fix the glitch? It's proving to be a big problem. – m00nsh1n3 Sep 03 '22 at 19:31
  • If you share your repo I can fix it for you. – Mr. Hugo Sep 05 '22 at 13:55
  • https://github.com/CowWorks/CowWorks-Improved I appreciate the help – m00nsh1n3 Sep 08 '22 at 13:28
  • The index.md in content should be _index.md – Mr. Hugo Sep 08 '22 at 23:15
  • I tried that but it didn't work. Any other ideas? – m00nsh1n3 Sep 09 '22 at 13:58
  • I stopped using the file as the welcome page and just used the homepage template feature, but I still can't get the routing to work. This is the code as of now: https://github.com/CowWorks/CowWorks-Improved/commit/939a705ecc7a6b5f88120494bb4a74b4f48bb358 – m00nsh1n3 Sep 09 '22 at 14:56
  • Hmmmm. Apparently it works now that I have reworked the homepage. I am not sure on what made the difference. – m00nsh1n3 Sep 09 '22 at 15:24