Hugo seemingly ignoring any content I place in `/content`. What am I doing wrong?

I’ve been trying to follow this tutorial to set my website up.

I’ve placed the bare minimum layouts in the right places (baseof.html, single.html, and list.html in /layouts/_default). I’ve also placed custom home pages (plural because this is a multi-lingual website) in /layouts as well. Finally, I’ve written a few content pages and placed them in /content.

Now when I run hugo server, or generate the static site by passing -D, hugo ignores everything in /content and only renders the home pages (from the layouts directory). Hugo fails when there is a syntax error in the front matter of content pages, so I know for a fact that it’s parsing files in /content, but, for some reason unknown to me, it doesn’t include them in the final output.

I’ve been trying to debug this issue for days (literally) going over hugo’s online documentation and forum posts here. I have reached a point were I don’t know what else to do. Can anyone please tell me what I’m doing wrong?

None of the contents are drafts. I’ve tried explicitly setting draft to false but to no avail.

I’ve set up a zip containing a hugo project that reproduces this issue.

Project Directory Structure
---------------------------

├── archetypes
│   └── default.md
├── config.toml
├── content
│   ├── contact
│   │   ├── _index.ar.html
│   │   └── _index.en.html
│   ├── privacy
│   │   └── _index.en.md
│   └── tos
│       └── _index.en.md
├── data
├── layouts
│   ├── _default
│   │   ├── baseof.html
│   │   ├── list.html
│   │   └── single.html
│   ├── index.ar.html
│   └── index.en.html
├── public
│   ├── ar
│   │   ├── catalog
│   │   │   ├── index.html
│   │   │   └── index.xml
│   │   ├── index.html
│   │   ├── index.xml
│   │   └── sitemap.xml
│   ├── catalog
│   │   ├── index.html
│   │   └── index.xml
│   ├── en
│   │   ├── index.html
│   │   └── sitemap.xml
│   ├── index.html
│   ├── index.xml
│   ├── robots.txt
│   └── sitemap.xml
├── resources
│   └── _gen
│       ├── assets
│       └── images
└── static

Hugo version: Hugo Static Site Generator v0.80.0/extended linux/amd64 BuildDate: 2021-07-18T09:31:51Z (debian 0.80.0-6+b5)

System: Gnu/Linux Debian 11

Your content has date = 2022-02-01 or similar. That’s in the future. If you want to include future posts, run hugo -F or hugo --buildFuture.

3 Likes

I can’t believe I wasted 3 days on this mistake. Thank you jmooring!

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