Hugo Blog Articles Not Displaying After Specified Time?

Since switching the blog to Hugo, encountered some pitfalls.

Articles correctly added, page time adjusted to today, or after today, but cannot display in article list.

The reason is that when Hugo templates loop through files, articles exceeding the current time won’t appear.

Timezone Issue

If your article time doesn’t specify a timezone.

Like this 2018-11-19 16:14:25, the article likely won’t display.

Hugo time is unified to Greenwich Mean Time, because China’s time is 8 hours earlier than Greenwich Mean Time. When Greenwich Mean Time hasn’t reached your configured time, articles won’t appear in the article list.

Solution

Local server

hugo server --buildFuture

Page generation

hugo --buildFuture

Article Link:

https://alili.tech/en/archive/hugo-articles-not-displaying/

# Latest Articles