Weird Data file problem

Are there any reserved words for the field names in a .Data file? I have a data object with the following field names: id, url, text, line1, line2, line3, line4, icon, color

I have another data object with other names, like service, description, narrative-structure, theme, etc. This file has no problem being read and rendered. But the other file, doesn’t maater what I call it, including renaming it as the name of the working file, will not render… I don’t reaaly even know if it is being found despite being in the data directory with the working file. They are syntactically the same, just hugo will not process - it doesn’t error out, just does nothing

This is the code in question: I changed id and url in this version think those might be problematic, but to no avail

{{ range .Data.services }}

{{ .line1 }}

ID: {{ .ozid }} | Text: {{ .text }}

[Link]({{ .ozUrl }})

{{ end }}

When I change the field names to the other data source, it renders with no problems. I’ve tried using yaml, toml, json, but the format makes no difference.

I know it’s probably going to be really obvious, but this work week fried my brain…

hugo v0.160.0+extended+withdeploy darwin/arm64 BuildDate=2026-04-04T13:32:34Z VendorInfo=Homebrew

Thanks for the assist in advance!

To access data contained in files within the data directory in the root of your project, use hugo.Data.

I was doing that, and it made no difference

Here’s a test site. Try it.

git clone --single-branch -b hugo-forum-topic-57011 https://github.com/jmooring/hugo-testing hugo-forum-topic-57011
cd hugo-forum-topic-57011
hugo server

The template code is in layouts/home.html, lines 13-28.

There must be something different about your setup, data structure, etc. If you can’t figure it out you’ll need to provide a link to the public repository for your project.

See Requesting Help.

Let us see your code

Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick git clone on your repo, then run hugo server in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.

If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.