如何修复 Hugo 忽略新文章的问题
当 hugo 忽略新文章而旧文章仍能正确渲染时,这通常是因为 hugo 认为新文章在未来。
解决方案 1:使用 -F(future)标志
向 hugo 使用 -F 标志以也渲染被认为在未来的文章。
hugo_serve.sh
hugo -F或
hugo_serve_future.sh
hugo -F serve解决方案 2:在 hugo.yaml 中设置时区
将其配置为你的时区,例如
hugo_timezone.yaml
timeZone: 'Europe/Berlin'这将修复 Hugo 将你的文章时间戳解释为 UTC 的问题,这会导致 Hugo 将你的时间戳解释为在未来。
Check out similar posts by category:
Hugo
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow