https://main--losthearts.netlify.app/posts/
On local machine, hugo --gc --minify --config hugo.toml works as expected and makes sure that the date in my /posts/ directory shows the post’s date.
</span><span class=published><time class="pull-right post-list">March 24, 2024</time></span></li></ul></main></div></body></html>
Where as in the netlify deployment, the same command builds it as
<span class=published><time class="pull-right post-list">:date_long</time></span></li></ul></main></div></body></html>
Causing the post’s date to be
On local machine it is built as:
@losthearts Provided that your repository contains the same code as locally, and it’s defined in a way where the same dependencies run, I wouldn’t expect any differences.
Is there a public repository for the site?
Thank you for the reply, here is the link to the public repo:
I believe you have tried to follow the documentation here: Host on Netlify | Hugo (gohugo.io), which is incorrect. The correct syntax is the one used here: tejal/netlify.toml at v8 · hrishikesh-k/tejal (github.com). It’s likely that the default Hugo version that Netlify uses doesn’t have the feature you’re trying to use.
2 Likes
Hi, thank you. Adding the necessary TZ=GST-1 environment variable did the trick.
1 Like