Files In /content/ Not Being Built Into HTML Except index.md

My understanding is all my markdown files in /content/ will use /layouts/_defaults/single.html

I cannot get any markdown file, other than index.md, to build into html upon running hugo or hugo server.

Here’s the file tree

├── archetypes
│ └── default.md
├── config.toml
├── content
│ ├── funding.md
│ └── index.md
├── data
├── layouts
│ └── _default
│ └── single.html
├── resources
│ └── _gen
│ ├── assets
│ └── images
├── static
│ └── style.css
└── themes

See my git repository for the full code. Am I missing something? Is there something wrong with the way I wrote single.html or style.css that is causing the markdown files other than index.md to not properly process?

I’m not using any themes. Very basic configuration: Markdown files in /content/ one html in /layouts/_defaults/single.html and one stylesheet in /static/style.css/

Thank you for any and all the help, I’ve been trying to get this to work for a few days now with no luck.

hugo env
hugo v0.125.5-c8b9f9f81c375f5b391e61bae711ee63fc76c1fd+extended linux/amd64 BuildDate=2024-05-01T15:22:11Z VendorInfo=snap:0.125.5
GOOS=“linux”
GOARCH=“amd64”
GOVERSION=“go1.22.2”
sass/libsass=“3.6.5”
webmproject/libwebp=“v1.3.2”
sass/dart-sass/protocol=“2.7.0”
sass/dart-sass/compiler=“1.76.0”
sass/dart-sass/implementation=“1.76.0”

By naming it content/index.md you have created a “leaf bundle” when what you want is a “branch bundle”.

Rename to content/_index.md and it will work.

Read up on bundles here Page bundles | Hugo.

2 Likes

This is one of several Hugo “oddities” you will encounter.

If Hugo end up fitting your way of doing things you will come to appreciate the power and flexibility these “oddities” afford Hugo users.

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