Pages added using Decap CMS are not built by Hugo

I was following Decap CMS guide to make simple Hugo based blog hosted on netlify.com. Everything went well and website was running, but the pages that were pushed to github using Decap CMS for some reason were not “visible” to Hugo and it ignored them. When I added md pages to repo using other tools then Hugo acted as expected building the page to public. This situation is super weird. I was even trying to debug this using latest Hugo code base locally, but no luck finding the exact place where it ignores the file.

The repo with Hugo setup:
https://github.com/mpielikis/blog

Netlify website:
https://clever-maamoul-f47a03.netlify.app

you can see there that only two pages added manually are visible but not the one added using Decap.

content/blog/
2025-04-17-from-decap.md. <-- added using Decap and ignored by Hugo build ?!
git-test.md. <-- added on GitHub and is visible to Hugo
test.md       <-- added locally and pushed and is visible to Hugo

Netlify Hugo version:
0.145.0

Local Hugo version:

❯ go run . env
hugo v0.147.0-DEV darwin/arm64 BuildDate=unknown
GOOS="darwin"
GOARCH="arm64"
GOVERSION="go1.24.2"

Thanks for advance for any help!

for me locally your blog now has three pages :wink:

just a guess , you have different timezones for the involved machines

  • creation (Decap)
  • publish (netlify)
  • local (manual push)

guess you published shortly after you created the page and the publishing part is a little behind.
You will have to make your ecap and Netlify have the same time zone

here’s some rather old issue also mentioning a netlify setup: Difference between server and build

with 146 there’s time.In that might help

check your logfiles to see when the page was actually built and I suppose that was before creation.

you can add something like in your range

{{ $format := "2006-01-02 15:04:05 -0700"}}
{{ with .Date  }}
   <small>STRING: {{ string . }}</small><br/>
   <small>NOW: {{ now.Format $format }}</small><br/>
   <small>DATE: {{ .Format $format }}</small><br/>
   <small>UTC: {{ .UTC.Format $format }}</small><br/>
   <small>Local: {{ .Local.Format $format }}</small><br/>
{{ end }}

and use --buildFuture commandline to recheck

Thank you for this quick reply! This explained everything. The problem was actually in Decap CMS datetime widget when it mistakenly was storing my local time as UTC timestamp. So when Hugo converted it to it’s local timezone, blog post was three hours in future, because my timezone is +03:00 hours. Changing the timezone of the server did not help because the timestamp was in UTC future. To fix this I’ve added picker_utc: true to the decap datetime widget, and it shifted the time to UTC timezone correctly after that.

Thank you for heading me to the right direction to find the solution!

BTW it would be super helpful if Hugo would print in it’s build log that it is skipping the page because of it’s “future date” as this type of issues are very confusing :slight_smile:

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