Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

page not generated due to missing timezone information in date frontmatter #254

Open
k4lizen opened this issue Oct 15, 2024 · 2 comments
Open

Comments

@k4lizen
Copy link

k4lizen commented Oct 15, 2024

Doing this:
https://github.com/526avijitgupta/gokarna/blob/fc09ce7645eb309dc70796376f0da042b10f9889/archetypes/posts.md?plain=1#L1-L10

is bad. Particularly date: {{ now.Format "2006-01-02" }} ommits necessary timezone information. See gohugoio/hugo#12940 for more information.

@k4lizen k4lizen closed this as completed Oct 15, 2024
@k4lizen
Copy link
Author

k4lizen commented Oct 15, 2024

Though this can be fixed by specifying timeZone = "Local" in the config.

@k4lizen k4lizen reopened this Oct 15, 2024
@jamesericdavidson
Copy link
Contributor

Though this can be fixed by specifying timeZone = "Local" in the config.

This would be a good addition to the docs. Feel free to submit a PR.

date: {{ now.Format "2006-01-02" }} ommits necessary timezone information

You can submit a PR which adds timezone offsets to date and lastmod.

exampleSite makes use of time:

date: 2020-10-01T17:55:28+08:00

Though the theme does not render it:

image

@yashmehrotra @526avijitgupta Thoughts on changing archetypes (#241) to add time information?

I prefer yyyy-mm-dd for simplicity and ISO 8601 compliance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants