How to Set the Default Hugo Archetypes to the Next Day
A hands-on guide to generating date and publishDate for the next day—or any day other than today—when creating new Hugo content files

If you’re using the Hugo static site generator, the default date and time assigned to new content is the current date and time. That’s perfectly normal, but what if you want to set the date to a different day, such as tomorrow or any other future date?
I often need this because I usually write drafts today and publish them the next day.
By default, the date and publishDate fields are typically defined in the archetypes/default.md file like this:
date: '{{ .Date }}'
publishDate: '{{ .Date }}'
When you create a new Hugo content file, the date fields in the front matter will be generated like this:
date: 2026-02-01T07:39:00+07:00
publishDate: 2026-02-01T07:39:00+07:00
For example, if you want newly created content files to be set to the next day at exactly 7:00 PM (UTC+7), you can update archetypes/default.md like this:
date: {{ (now.AddDate 0 0 1).Format "2006-01-02" }}T19:00:00+07:00
publishDate: {{ (now.AddDate 0 0 1).Format "2006-01-02" }}T19:00:00+07:00
Now, if you create a new content file on February 1, 2026, the front matter will be generated as follows:
date: 2026-02-02T19:00:00+07:00
publishDate: 2026-02-02T19:00:00+07:00
Of course, you can adjust the date and time to match whatever publishing schedule you prefer.
Now that you can set the date and time to a future value, you might be wondering why not publish it automatically or schedule the post. Can you do that with Hugo? The answer is yes—stay tuned for my next article.
As always, thanks for reading. If you have any questions or better methods, feel free to leave a comment below.
Cheers!
