.Ds_Store in .gitignore caused problem with Hugo Data files

I’m setting up my Hugo dev environment on a Macbook Pro and it’s going well except for a curious little issue I encountered.

When issuing the command git status I got a notification for an untracked .Ds_Store file. I know that this is a MacOs file system file so I added it to my .gitignore file.

On my index page I am rendering a couple of data files and when I pushed the change to my repo my index page was deployed without rendering the data files.

I reverted the change and then everything was like before.

Has anyone else encountered this? It doesn’t matter that much, I can live with the terminal notification for .Ds_Store but I found it a bit odd that adding it to .gitignore breaks data files.

I have it excluded in a .gitignore on a site using data, and it has not caused trouble, at least so far.

Does adding --verbose to hugo server get you any hints? I had a weird problem using this in my footer on a different site:

 <em>Updated: {{ .Lastmod }} {{ .GitInfo.AbbreviatedHash }}</em>

If the post wasn’t git-committed yet, hugo server would choke and not display things correctly.

(or more correctly, I caused hugo server to choke because I told it to look for git info, but did not supply any)

No adding --verbose does not give any relevant info. The index generates with the Data files in Hugo server. It’s only when the site is deployed to Gitlab Pages that they’re missing.

Anyway I guess it’s something odd with the Gitlab setup.

Also even though I removed .DS_Store from .gitignore I am no longer getting the untracked file notification in the terminal… Go figure…