How to control the effective build time

Long time Hugo user, first time caller.

Is there any way to specify the effective build time when executing hugo, with regard to how it treats future and expired posts? For example, suppose I want to build the site as it will build tomorrow.

I’ve looked through the command line options, where I would have expected to see something like --date, but came up empty. Google, and searching this discourse also didn’t find what I want.

I’m guessing it’s not supported. :slightly_frowning_face:

And to be clear, I am aware of --buildFuture and --buildExpired, but that’s not what I want. I don’t want to build all future/expired posts. I want to build the site as if it were a different day.

Thanks.

Follow this issue:
https://github.com/gohugoio/hugo/issues/8787

There’s an associated PR, but I don’t know if anyone has looked at it:
https://github.com/gohugoio/hugo/pull/9138

2 Likes

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